



The software
section is written using the Arduino IDE, and all pages use the native tft_Espi library.
Version 1.0 has five pages: temperature and humidity detection, clock & detection, city weather, calendar, and settings.
There are three buttons on the back: the side buttons are used to switch pages, and the middle button is used for confirmation with a short press and for sleep mode with a long press.
The main
controller selected is the ESP-wroom-32 module. Since it needs to be powered by a lithium battery pack, the power supply circuit does not use LDO, but uses a DCDC solution.
Several power-consuming components use transistors as switches. After sleep mode, the current is high.
Precautions:
1. Required libraries:
TFT_eSPI, OneButton, DFRobot_DHT20, ArduinoJson, NTPClient, ArduinoZlib (For the installation of this library, please refer to my Bilibili video: https://www.bilibili.com/video/BV1wj421Z7Ds/?vd_source=c106ac8c60f1249e356ef02bdcc85de7).
2. The parts of the project that need to be modified: (1) The key in the Common file. This is self-explanatory. Register it yourself on Hefeng Weather. If you don't know how to register, refer to the video link above. (2) In the Task file, adjust the adcOffset parameter if the voltage detection is inaccurate, as the error will definitely be different for each board, and this can only be corrected through code.
III. Pay close attention to the words highlighted in red in the BOM list; do not buy the wrong materials.
Lithium battery packs must be purchased with built-in protection chips, as the PCB does not have charging and discharging protection circuitry. The battery pack should contain a maximum of two 18650 batteries; more than that will not fit. Of course, it can also be used continuously while plugged in, as batteries are not cheap.
Demo video:
https://www.bilibili.com/video/BV15C411E7Jc/?vd_source=c106ac8c60f1249e356ef02bdcc85de7
Resource downloads:
CC Temperature and Humidity Meter 1.0 source code package: https://pan.quark.cn/s/2fc2e1064f08
tft_espi configuration file: https://pan.quark.cn/s/671f7b675051
BOM list (add purchase link on screen): https://pan.quark.cn/s/746a18b07f21
Shell files: https://pan.quark.cn/s/ad7dabe86efd
3D modeling source files: https://pan.quark.cn/s/075d7af6f176