Note: * indicates required fields.
# [Please fill in during the registration phase↓]
## * 1. Self-introduction/Team Introduction
I am a self-taught embedded engineer who has served as a technical leader in many companies, mainly engaged in security and Internet of Things related industries. I am a creative and persevering geek~
In 2019, I taught myself front-end, back-end, desktop, linux, python and other development knowledge at home, established the Yunzhe Innovation Team, and realized the Yunzhe smart home project. Yes, there is only me in the team now, hahaha~
This is my personal website [Yunzhe Innovation](http://www.yunzhecx.cn/)
## * 2. Briefly introduce the project
This project is part of Yunzhe Smart Home. Due to the word limit of a single article and the content is too concentrated to affect the viewing experience, it is divided into multiple projects, as follows
[#Fifth Lichuang Electronic Design Competition# Yunzhe Smart Home](https://diy.szlcsc.com/p/crudeoil/yun-zhe-zhi-neng-jia-ju)< br>
< br>
[#Fifth Lichuang Electronic Design Competition# Yunzhe Smart Home-Serial Port Screen](https://diy.szlcsc.com/p/crudeoil/yun-zhe-zhi-neng-jia-ju-chuan-kou-ping)< br>
< br>
[#The Fifth Lichuang Electronic Design Competition# Yunzhe Smart Home-Touch Panel](https://diy.szlcsc.com/p/crudeoil/yun-zhe-zhi-neng-jia-ju-chu-kong-mian-ban)< br>
< br> [#The Fifth Lichuang Electronic Design Competition#
Yunzhe Smart Home-Light Controller] (https://diy.szlcsc.com/p/crudeoil/yun-zhe-zhi-neng-deng-kong-zhi-qi)< br> < br> [#The Fifth Lichuang Electronic Design Competition# Yunzhe Smart Home-Wall Switch](https://diy.szlcsc.com/p/crudeoil/yun-zhe-zhi-neng-jia-ju-qiang-bi-kai-guan)< br>
< br> [#Fifth LiChuang Electronic Design Competition# YunZhe Smart Home-WiFi Serial Keyboard](https://diy.szlcsc.com/p/crudeoil/chuan-kou-an-jian-ban)< br> < br> [#Fifth LiChuang Electronic Design Competition# YunZhe Smart Home-Internet of Things Incubator](https://diy.szlcsc.com/p/crudeoil/wu-lian-wang-fu-hua-qi)< br> < br> This smart home is completed by an individual, and there may be imperfections in the design and development process. To discuss the project, you can scan the QR code to join the group. ![YunZhe Innovation Group Chat QR Code.png] # [Please fill in during the competition↓] ## * 1. Describe the project details The serial screen uses stm32f103 as the main control, 3.5-inch screen, external flash can store custom fonts and update programs, the main control contains the QR code algorithm, and the QR code content can be displayed by sending commands through the serial port. Hot-swap function can be realized. ## * 2. Describe the challenges and problems faced by the project ### 2.1 Problems encountered when revising the serial screen Since the screen needs to decode 433, the screen board of the gateway was developed earlier. The first version was made in July. The size was not considered in the first version, just for testing. Later, in order to fit into the gateway shell, the size was modified. The screen control line was modified by the way, just for reasonable routing. After the proofing, the soldering iron had problems and could not be dragged. There was no air gun, so I looked for rosin, soldering iron tip, tin wire, or soldering iron. Finally, the only problem left was the soldering iron. At this time, I went abroad for a few days. After returning, I finally made up my mind to buy an air gun. After soldering, the screen was white? The program ran normally on the first version, so the program problem was ruled out. Then I used a multimeter to measure one pin at a time. The short circuit was found out, but it was still the same. I soldered another piece, and it was still white. Two days passed, and I was at a loss. I was stuck in the quagmire that there was no problem with the program or the hardware, and I completely forgot that I had modified the pins for better routing. Finally, I looked at the three boards calmly, and the only way left was to compare the second version of the board with the first version of the picture. Only in this way did I find out the problem. So it is necessary to have a record of what you do. **2.2 Later improvements to the serial port screen** Touch function can be added to achieve a better interactive experience; backlight brightness adjustment and ambient light detection automatic brightness adjustment function can be added; different stickers can be pasted on the glass in front of the screen to make the window into a special-shaped display area. ## * 3. Describe the key points involved in the hardware and software parts of the project ### 3.1 Gateway motherboard and screen communication protocol (serial port) ![picture.png] In the above picture, xxxx is the x coordinate of the screen, and yyyy is the y coordinate of the screen ### 3.2 UI interface display logic3.2.1 There is a task list of screen interfaces in the motherboard. Different interfaces have different implementation steps, so hot plugging of the screen can be realized. After the screen is reconnected, the current interface will be redisplayed; 3.2.2 When a certain command is not responded to by the motherboard, the handshake protocol is triggered. After the handshake is successful, the command will be resent, so as to realize the orderly and stable display of screen information. 3.2.1 Partial implementation code of screen display logic``` typedef struct { uint8_t state; uint8_t waitingTime; uint8_t currentUi; uint8_t maxStep[2]; uint8_t step; }UI_S; ``` ### 3.3 Download Chinese font library on the screen3.3.1 USB to serial port connector connects to the screen serial port 3.3.2 Open sscom5.13.1 version, baud rate 115200.8, n, 1, send settings as shown below ! [picture.png] 3.3.3 Send command




sscom received

or
![2020-05-21T11:38:37.png] (http://pi4.yunzhecx.cn:30080/typecho/usr/uploads/2020/05/2456486009.png)
3.3.4 Click to clear the window, open the file, and select font library.bin, as shown below

3.3.5 Click "Send File" and receive the following response
! [2020-05-21T11:39:08.png](http://pi4.yunzhecx.cn:30080/typecho/usr/uploads/2020/05/2107118307.png )
Start writing from the first block outside, that is, the starting address is 4096, and after writing 256 bytes, return to the current address 0000004352, sssnnn is the end mark.
After writing, the status is as follows
! [2020-05-21T11:39:43.png ](http://pi4.yunzhecx.cn:30080/typecho/usr/uploads/2020/05/2711641536.png)
You can see that a total of 282752 bytes are sent, which is consistent with the file size, and the font download is completed.
## * 4. Display the list of project materials
![Image 20200913-010.jpg]

## * 5. Upload project pictures
### 5.1. Print the logo of the competition on the PCB. Failure to do so will be deemed as giving up the competition
![IMG_20190922_203631.jpg]

### 5.2, other pictures of the project
![1.jpg]

![2.jpg]

![Image 20191010-51.jpg]

pcb circuit
![magic mirror display pcb.jpg]

schematic diagram
![magic mirror display principle .jpg]

## * 6. Demonstrate your project and upload it as a video
### 6.1. Upload the video to the official website of the competition
### 6.2.
Notes on B-site video titles and links: ①: Video requirements: Please shoot in horizontal mode, with a resolution of no less than 1280×720, in Mp4/Mov format, and a single video size limited to 100M; ②: Video upload: Please upload simultaneously Go to the official website of the competition and Bilibili ([www.bilibili.com](www.bilibili.com)), the top 10 projects on Bilibili will receive a cash reward of 1,000-5,000 yuan, and other uploaded projects will receive a 100 yuan free threshold coupon for the Lichuang Mall; ③: Video title: The 5th EasyChuang Electronic Design Competition: {Project Name}-{Video Module Name}; such as the 5th EasyChuang Electronic Design Competition: "Autonomous Driving" Project-Team Introduction. [The 5th
Lichuang Electronic Design Competition: Yunzhe Smart Home-Personal Introduction and Project Introduction]( https://www.bilibili.com/video/BV1Ja4y177WC
) [#Fifth Lichuang Electronic Design Competition #YunZhe Smart Home-Serial Port Screen]( https://www.bilibili.com/video/BV1BK411P7Gj/ ) Zhejiang Smart Home](https://diy.szlcsc.com/p/crudeoil/yun-zhe-zhi-neng-jia-ju)< br> < br> ## * 7. Is it the first public release ### 7.1 , Has the project been published or won awards before? If not, please indicate that it has not been published ### 7.2. If the project is optimized on the original basis, please indicate whether the optimized part ## * 8. Open source documentation ## * 9. References Click the link for more details: [https://www.szlcsc.com/go/dsxq](https://www.szlcsc.com/go/dsxq)