U5ROwNIr

#The 7th Lichuang Electronic Competition#N32G430 alarm clock

 
Overview

* 1. Introduction to project functions
(1) Weather clock: Display the current date, time, weather conditions and three-day weather forecast on the LCD.
(2) Alarm clock: After setting the alarm time, when the alarm time is reached, the buzzer sounds and lasts for one minute.
(3) Small fan: After pressing button 4, the motor rotates.
*2. Project properties
ESP8266 Weather Clock Part of the code reference: oled weather clock - Jiali Chuang EDA open source hardware platform (oshwhub.com)
The rest is written by myself, and the project has not participated in any competition or defense.
* 3. Open source agreement
GPL3.0
*4. Hardware part
(1) Main control MCU: N32G430C8L6, ESP8266
(2) Program download and debugging: The H3 pin header on the PCB, from left to right, is SWCLK, SWDIO, GND, VCC, RX, TX; SW1 on the PCB is reset, and SW2 is boot selection
(3) N32G430C8L6 and ESP8266 use serial port communication. ESP8266 can be directly connected to the H3 pin header (ESP8266 uses a module purchased from Taobao)
(4) Power supply can be supplied by the TYPE-C port data cable, which is converted to 3.3V by AMS1117 and then supplied to the main control MCU
(5) There are four buttons on the board, connected to PB6, 7, 8, 9. When in use, you need to use a jumper cap (or Dupont line) to short-circuit H9101112 for normal use; the two LED lights are connected to PD12, 13
(6) H4, 6 are LCD screen interfaces, you can solder whichever one you want.
(7) Only soldering the MCU, crystal oscillator circuit and power supply circuit can be used as a minimum system board
 
*5. Software part
(1) usart_proc(): Use serial port receive interrupt. When " " is received,
it means that one reception is completed and UsartFlag is set to 1. Then, the corresponding data processing is performed according to the received content
(2) key_proc(): key scan function. When key 1 is pressed, the alarm setting is entered. At this time, pressing key 2 will increase the hours, pressing key 3 will increase the minutes, and pressing key 1 again will increase the hours. Exit the alarm setting and store the alarm data in the EEPROM; press button 4 to switch the motor running state
(3), LCD_proc(): LCD screen display function
(4), GPIO.c GPIO.h: GPIO pin definition and initialization file
(5), LCD part: The LCD uses a 3.5-inch TFT-LCD (ILI9488 software simulation SPI driver). When using it, you need to add LCD.cLCD.hGUI.cGUI.hfont.h to the project (to prevent repeated inclusion errors, do not #include "font.h" in main.c). The LCD screen uses RGB-24-bit color. When using image acquisition, you must pay attention to it4ZiW5RHwmHlChsrWR7CHjBDcUNqb2sAJgCJKHt.pngcalling void Paint_Bmp1(int x0,int y0,const unsigned char bmp[],u32 color,u32 bc) when using monochrome acquisition; calling function void Lcd_Draw_Num32(uint16_t x, uint16_t y, uint32_t fc, uint32_t bc, uint16_t num ,uint8_t len); can display the digital tube font, use void Show_Str(u16 x, u16 y, u32 fc, u32 bc, u8 *str,u8 size,u8 mode); can display Chinese and English characters (need to be in the font library); Chinese character modulus uses the horizontal modulus C51 format; changing #define USE_HORIZONTAL (108 lines) in LCD.h can change the direction of LCD display
 
6. BOM list
hz6ix9NJaCw8uDwXuDgYaFldZVD9uyTrscjfbIrc.pngNote: BOM list involved in the project. Please upload a screenshot of the BOM in this location. Please upload the list details in PDF format to the attachment. It is recommended to include model, brand, name, package, procurement channel, purpose and other content. The specific content and form should be based on the clear expression of the project composition.
 
7. Competition LOGO verification
 8. Demonstration video
 
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-06-19 08:57:13

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号