As simple clock built on top of an esp8266
Helmut Pozimski 8f62464c55 main: calculate exact number of seconds before sleep time ends | 2 лет назад | |
---|---|---|
Fritzing | 2 лет назад | |
LICENSES | 2 лет назад | |
main | 2 лет назад | |
.gitignore | 2 лет назад | |
CMakeLists.txt | 2 лет назад | |
Makefile | 2 лет назад | |
README.md | 2 лет назад | |
esp8266-clock_breakout.png | 2 лет назад |
This repository contains a small project which uses an ESP8266 microcontroller together with a DS3231 clock and a tm1637 display module to implement a clock that occasionally synchronizes time over NTP and displays the current time coverted to a configurable local timezone. It is implemented using the ESP8266 RTOS SDK.
Download the ESP8266 RTOS SDK from the github project either as a release tarball or clone the repository. Follow the instructions from the project README file to install it and ensure that you can successfully compile software that uses the SDK.
To execute this project, you will need the following components:
Wire the SDA and SCL pins of the DS3231 module to one of the GPIO pins each as well as the CLK and DIO pins of the TM1637 module. THe example below uses the following PIN mapping:
DS3231:
TM1637:
Also connect GPIO pin 16 (D1 mini pin pin D0) to the RST using a 330 Ohm resistor pin to ensure that the controller may enter the deep sleep state. My board would sometimes boot into flash mode after waking up from deep sleep. To prevent that I added a 10k Ohm pull-down on pin D8.
All configuration variables that are available are listed in the file main/configuration.h
. You should first fill in the blanks there and define your wifi configuration, time zone and the pins the modules are connected to.
After everything is set up, the program can be compiled with the make
command and be flashed to the microcontroller by calling the flash
target.
This project is licensed under the GNU General Public License, Version 2.