NTP clock with Adafruit 1.2" I2C display on ESP8266 in Micropython
This project uses submodules. Clone with git clone --recurse-submodules
or git submodule init
in each submodule directory.
- 1x esp8266 development board with USB - I used a nodemcuv2 variant
- 1x Adafruit 1.2" 4-Digit 7-Segment Display with I2C Backpack - there are a few color choices. Based on HT16K33 controller.
- 1x DHT-22 Temperature and Humidity Sensor
- 3x 10K resistors for pullups
- 1x old phone USB charger - to power it when it is on the wall
Pins are currently hardcoded
- IO → 3V3
- + → VIN (5V)
- - → GND
- D → D1 (Pin 5) + pullup resistor to IO or 3V3
- C → D2 (Pin 4) + pullup resistor to IO or 3V3
- VDD → 3V3
- Data → D5 (Pin 14) + pullup resistor to VDD or 3V3
- NC
- GND → GND
- Install micropython to your board https://docs.micropython.org/en/latest/esp8266/esp8266/tutorial/intro.html
cp config.json.example config.json
and edit config.json to match your environment- Upload the sources to the device - load.sh is an example using ampy to load them over serial
- Configurable I/O Pins
- Improve MQTT configurability
- Improve DHT-22 configurability
- Make DHT-22 optional
- Improve localization (Timezone and DST offsetting)