https://github.com/217heidai/astronautsclock
基于 ESP8266 及 1.3 寸 TFT 实现的华为太空人时钟
https://github.com/217heidai/astronautsclock
clock esp8266 esp8266-arduino tft tft-display
Last synced: 3 months ago
JSON representation
基于 ESP8266 及 1.3 寸 TFT 实现的华为太空人时钟
- Host: GitHub
- URL: https://github.com/217heidai/astronautsclock
- Owner: 217heidai
- License: gpl-3.0
- Created: 2021-09-24T02:30:41.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-05-06T01:53:28.000Z (about 1 year ago)
- Last Synced: 2025-10-09T11:51:01.351Z (8 months ago)
- Topics: clock, esp8266, esp8266-arduino, tft, tft-display
- Language: C
- Homepage:
- Size: 5.27 MB
- Stars: 19
- Watchers: 0
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AstronautsClock
基于 ESP8266 及 1.3 寸 TFT 实现的华为太空人时钟。参考了 d88880(抖音号) 的简易太空人时钟代码。
## 展示

## 功能
1. 时间、日期、星期,每 1 小时校准一次
2. 实时天气信息:天气、温度、湿度、空气质量,每半小时刷新一次
3. 整点蜂鸣报时
4. 整点更换 gif(龙猫跳绳、龙猫跳舞、太空人)
## 材料清单
1. ESP8266 开发板
2. 中景园 1.3 寸 TFT,分辨率 240 x 240
3. 蜂鸣器
4. 微积木
## 电路图

## 代码编译说明
### 依赖库
1. ArduinoJson
2. TimeLib
3. TFT_eSPI
4. TJpg_Decoder
5. Buzzer
### 配置修改
1. 修改 TFT_eSPI 库管脚定义,参考 [User_Setup.h.backup](https://raw.githubusercontent.com/217heidai/AstronautsClock/main/src/User_Setup.h.backup):
```C
#define TFT_MISO 14
#define TFT_MOSI 13
#define TFT_CS -1 // Chip select control pin D8
#define TFT_DC 5 // Data Command control pin
#define TFT_RST 4 // Reset pin (could connect to NodeMCU RST, see next line)
#define TFT_BL -1 // LED back-light (only for ST7789 with backlight control pin)
```
2. `CLOCK.ino`中修改 WiFi 信息,设置 `ssid`、`password`
3. `CLOCK.ino`中修改天气城市代码,设置 `cityCode`