The hardware
tried to use one lithium battery to reduce the voltage to 3.3v and then supply power to the board. The voltage may not be enough because of the display, so two lithium batteries were connected in series to reduce the voltage to 5v and then supply power from the VIN of the board.
Or you can try to use a lithium battery to boost the voltage to 5v and then supply it to the VIN pin of the board.
5v boost charging circuit reference: [5V input] Boost charging, can charge two lithium batteries in series.
Note that the 1117 step-down chip cannot be connected to the 5v of the charging circuit after reducing the voltage, so that the battery can be charged after the voltage is reduced. A loop is formed. 1117 will smoke.
Key detection:
There is a problem with the key detection circuit here. I originally thought that I could program this pin to be in a pull-up state, but there were few reference materials, so I couldn't find it.
So if you don’t know how to set it up, just design it as a two-level button.
Software copy
homework software copy homework from: Using esp8266 to light up the welfare screen model st7735 1.44 TFT screen
software is relatively complicated, involving knowledge of the Internet of Things, and arduino programming uses packaged libraries, so it is not easy to understand. Including but not limited to json parsing, TFT display, NTP server, network configuration, etc., it is relatively complicated. I also copied the homework and modified it myself.
A lunar date display has been added. Here you need to find an API interface to parse it.
There are weather-knowing APIs available online, but they are restricted after a few accesses, or you have to pay for them. I found another one that is free of charge, but you need to add the date of the Gregorian calendar to the URL when accessing. The example is as follows http://lunarapi.top/lunar/getbydate?date=2022-08-02
It involves the issue of fonts again. You need to download a software processing and transcoding at the same time. It's all in the attachment.
The specific operation is: TFT_eSPI adds various font libraries
ESP8266. There is not enough time at the end of the custom font of the TFT_eSPI library
, and there is no time to draw a 3D shell.
By doing this, I have a new understanding of network API interface applications. At the same time, because I don't study web development, I am not very clear about json parsing. I imitated other people's code and tried to parse and understand it.
If you are interested, you can combine the esp8266 development board and TFT on a PCB board, which will make it more compact.
Arduino is relatively powerful and has various libraries, but if you are not specialized in it, it is not easy to understand because it is so well encapsulated, and you have to look for source files in local libraries.
The processing software and the used library files and project attachments cannot be accommodated. You can go to csdn to download: 1.44TFT Astronaut Weather Clock (st7735) produced by ESP8266, including software and hardware.