See how to build it at Make Projects.
This project was possible to the following libraries:
This program has been developed using Micro Python and runs in the ESP32 board. My first attempt was to make it run in a Raspberry Pico W, but I run into problems with the timer. If you know how to solve it, please let me know.
For installing MicroPython into the ESP32 follow the official documentation. Once Micro Python is loaded into the ESP32, you can upload the project files with the mpremote tool. You can instal mpremote locally using pipx.
To upload the files, use:
mpremote cp main.py :
mpremote cp rotary.py :
mpremote cp rotary_irq.py :
mpremote cp tm1637.py :Before you upload the file secrets.txt, edit the file and replace the current content with your WiFi SSID and your WiFi's password. Make sure they are separated by a ,.
mpremote cp secrets.txt :For debugging, you can run the local copy of main.py into the ESP32 with the following command
mpremote run --follow main.pyThen you can see you debug traces with
mpremoteEnjoy!
The 7-Semgment display may show the following error codes:
- err0: The measure could not be retrieved from the DHT sensor, temperature and humidity will be set to 0.
- err1: After connecting to the WiFi, the time could not be set.