Table of Contents Overview This is my first time using GD's Calibri MCU. The process was smooth and I didn't encounter any difficult problems. Use Calibri MKD integrated compilation environment. The GD32-colibri-F350RX development kit integrates an emulator, which is ideal for beginners. You don't need to worry about emulation and program downloading. Through the experience of some peripherals of GD32F350 some time ago, I can already handle the chip with familiarity. So here I will implement a simple simulation project. The concept of smart home has been around for some time, but the real explosion has not yet appeared in the market, but the future prospects must be good. There are many products on the market, of all kinds. I will also take advantage of the popularity to realize Bluetooth smart bedroom control. First, the overview of the realization of the goal: 1. The Bluetooth module communicates with GD32-colibri-F350RX through the serial port. The mobile phone app can control the LED on the GD32-colibri-F350RX development kit ; 2. The LCD displays the real-time bedroom temperature and humidity; 3. When the temperature is too high, when it reaches the set threshold value, an alarm signal is issued, and the prompt is displayed through the LCD . And turn on the air conditioner, and simulate it by controlling the on and off of the LED through the relay. Second, materials 1, GD32-colibri-F350RX development kit; 2, Bluetooth module; 3, LCD display; 4, relay; 5, LED lamp; 6, some Dupont wires, etc. 3. Hardware assembly 1. Connect GD32-colibri-F350RX development kit to Bluetooth module 374928 Connect 3.3V to the Bluetooth module to power it. Define PA9 and PA10 as USART0 and connect to the Bluetooth module serial port to achieve mutual communication. 2. Connect the GD32-colibri-F350RX development kit to the 12864 LCD display 374929. Power the LCD module and the backlight through the power interface of the development board. Select the serial mode for LCD and ground PSB. PB1---->CS Chip select signal PB0----->SID Data signal PB12----->SCK Clock signal PB15----->PSB Mode selection 3. Connect with relay 374930 Use PA6 to control the relay. Physical connection diagram: 374931 Fourth, the overall system structure diagram [attach] 374940 [/attach] Five, software implementation 2, Bluetooth module and development kit to achieve serial communication: Here we mainly process the data sent by the BluetoothBLEmodule. USART0interrupt function implementation
Both sending and receiving are processed by interrupt functions, so as not to wasteCPUresources. Interrupt reception, and process the data in the mainfunction. Compile and download 374933, and you can control the LED lights on the development board through the mobile phone app. 1. Realize LCD to display the temperature and humidity in the bedroom: Define the pins connected to the lcd 374935. I am using a 12864 Calibri LCD display. I will not post the driver for it, but directly display the part. 2. Realize automatic control. The learning environment can be adjusted in real time according to the indoor temperature and humidity parameters. Here I use relays to simulate the air conditioner or humidifier switch. 374938 When the temperature reaches a preset threshold, a high temperature threshold and a low temperature threshold can be set. When it is higher than the high temperature threshold or lower than the low temperature threshold, the air conditioner switch is automatically turned on. Here, a relay is used to light up the LED to simulate. 6. Demo video display https://v.youku.com/v_show/id_XMzgxODQwMTgzMg==.html?spm=a2h3j.8428770.3416059.1 u color=rgb(0, 0, 255)]https://v.youku.com/v_show/id_XMzgxODQwMTgzMg==.html?spm=a2h3j.8428770.3416059.1[/url] Seventh, Summary With the continuous development and growth of social economy, people's demand for working and living environment is also constantly increasing, and smart home is born. But the accompanying security issues must be solved. Smart home has been very popular in recent years, but it has not yet entered thousands of households. What is the reason? In any case, smart home, smart building and Internet of Things are growing rapidly. In high-end buildings, you will find that whether it is automatic adjustment of lights or automatic adjustment of air conditioners, they are more humanized, and there are many smart scenes, so smart home will definitely be a good market in the future. Coupled with AIbig data, the future world may be beyond your imagination. Here I simply simulated and realized a smart bedroom. To be truly intelligent, it must be connected to the cloud, and more importantly, security issues should be considered. Supplementary content (2018-11-4 11:24): 1. The temperature and humidity sensor data is collected by the Bluetooth module through the UART interface to receive sensor data. 2. Since I only have the Cypress BLE module, I used its BLE function and sensor data collection.html[/url]Here we mainly process the data sent by the BluetoothBLEmodule. USART0Interrupt function implementation Both sending and receiving are processed by interrupt functions, so as not to wasteCPUresources. Interrupt reception, and process the data in themainfunction. 374933[/attach] Compile and download, and control theledlight on the development board can be realized through the mobile phoneapp. 1. Realize LCD to display the temperature and humidity in the bedroom: Define the pins connected to the lcd 374935. I am using a 12864 Calibri LCD display. I will not post the driver for it, but directly display the part. 2. Realize automatic control. The learning environment can be adjusted in real time according to the indoor temperature and humidity parameters. Here I use relays to simulate the air conditioner or humidifier switch. 374938 When the temperature reaches a preset threshold, a high temperature threshold and a low temperature threshold can be set. When it is higher than the high temperature threshold or lower than the low temperature threshold, the air conditioner switch is automatically turned on. Here, a relay is used to light up the LED to simulate. 6. Demo video display https://v.youku.com/v_show/id_XMzgxODQwMTgzMg==.html?spm=a2h3j.8428770.3416059.1 u color=rgb(0, 0, 255)]https://v.youku.com/v_show/id_XMzgxODQwMTgzMg==.html?spm=a2h3j.8428770.3416059.1[/url] Seventh, Summary With the continuous development and growth of social economy, people's demand for working and living environment is also constantly increasing, and smart home is born. But the accompanying security issues must be solved. Smart home has been very popular in recent years, but it has not yet entered thousands of households. What is the reason? In any case, smart home, smart building and Internet of Things are growing rapidly. In high-end buildings, you will find that whether it is automatic adjustment of lights or automatic adjustment of air conditioners, they are more humanized, and there are many smart scenes, so smart home will definitely be a good market in the future. Coupled with AIbig data, the future world may be beyond your imagination. Here I simply simulated and realized a smart bedroom. To be truly intelligent, it must be connected to the cloud, and more importantly, security issues should be considered. Supplementary content (2018-11-4 11:24): 1. The temperature and humidity sensor data is collected by the Bluetooth module through the UART interface to receive sensor data. 2. Since I only have the Cypress BLE module, I used its BLE function and sensor data collection.html[/url]Here we mainly process the data sent by the BluetoothBLEmodule. USART0Interrupt function implementation Both sending and receiving are processed by interrupt functions, so as not to wasteCPUresources. Interrupt reception, and process the data in themainfunction. 374933[/attach] Compile and download, and control theledlight on the development board can be realized through the mobile phoneapp. 1. Realize LCD to display the temperature and humidity in the bedroom: Define the pins connected to the lcd 374935. I am using a 12864 Calibri LCD display. I will not post the driver for it, but directly display the part. 2. Realize automatic control. The learning environment can be adjusted in real time according to the indoor temperature and humidity parameters. Here I use relays to simulate the air conditioner or humidifier switch. 374938 When the temperature reaches a preset threshold, a high temperature threshold and a low temperature threshold can be set. When it is higher than the high temperature threshold or lower than the low temperature threshold, the air conditioner switch is automatically turned on. Here, a relay is used to light up the LED to simulate. 6. Demo video display https://v.youku.com/v_show/id_XMzgxODQwMTgzMg==.html?spm=a2h3j.8428770.3416059.1 u color=rgb(0, 0, 255)]https://v.youku.com/v_show/id_XMzgxODQwMTgzMg==.html?spm=a2h3j.8428770.3416059.1[/url] Seventh, Summary With the continuous development and growth of social economy, people's demand for working and living environment is also constantly increasing, and smart home is born. But the accompanying security issues must be solved. Smart home has been very popular in recent years, but it has not yet entered thousands of households. What is the reason? In any case, smart home, smart building and Internet of Things are growing rapidly. In high-end buildings, you will find that whether it is automatic adjustment of lights or automatic adjustment of air conditioners, they are more humanized, and there are many smart scenes, so smart home will definitely be a good market in the future. Coupled with AIbig data, the future world may be beyond your imagination. Here I simply simulated and realized a smart bedroom. To be truly intelligent, it must be connected to the cloud, and more importantly, security issues should be considered. Supplementary content (2018-11-4 11:24): 1. The temperature and humidity sensor data is collected by the Bluetooth module through the UART interface to receive sensor data. 2. Since I only have the Cypress BLE module, I used its BLE function and sensor data collection.https://v.youku.com/v_show/id_XMzgxODQwMTgzMg==.html?spm=a2h3j.8428770.3416059.1[/url] Seventh, Summary With the continuous development and growth of social economy, people's demand for working and living environment is also constantly increasing, and smart home is born. But the accompanying security issues must be solved. Smart home has been very popular in recent years, but it has not yet entered thousands of households. What is the reason? In any case, smart home, smart building and Internet of Things are growing rapidly. In high-end buildings, you will find that whether it is automatic adjustment of lights or air conditioning, they are more user-friendly, and there are many smart scenes, so smart home will definitely be a good market in the future. Coupled with AI big data, the future world may be beyond your imagination. I just simply simulated and realized a smart bedroom here. To be truly intelligent, it must be connected to the cloud, and more security issues are considered. Supplementary content (2018-11-4 11:24): 1. The temperature and humidity sensor data is collected by the Bluetooth module through the UART interface to receive sensor data. 2. Since I only have the cypress ble module, I used its ble function and sensor data collection.https://v.youku.com/v_show/id_XMzgxODQwMTgzMg==.html?spm=a2h3j.8428770.3416059.1[/url] Seventh, Summary With the continuous development and growth of social economy, people's demand for working and living environment is also constantly increasing, and smart home is born. But the accompanying security issues must be solved. Smart home has been very popular in recent years, but it has not yet entered thousands of households. What is the reason? In any case, smart home, smart building and Internet of Things are growing rapidly. In high-end buildings, you will find that whether it is automatic adjustment of lights or air conditioning, they are more user-friendly, and there are many smart scenes, so smart home will definitely be a good market in the future. Coupled with AI big data, the future world may be beyond your imagination. I just simply simulated and realized a smart bedroom here. To be truly intelligent, it must be connected to the cloud, and more security issues are considered. Supplementary content (2018-11-4 11:24): 1. The temperature and humidity sensor data is collected by the Bluetooth module through the UART interface to receive sensor data. 2. Since I only have the cypress ble module, I used its ble function and sensor data collection.
|