07 - Radio Wireless
Overview
2.4G radio wireless communication, only supports communication between ESP32 series hardware (cannot communicate with Microbit via 2.4G)
This communication method supports communication between three types of boards: Grape Board, Future Board, and Future Board Lite
Application method
Building Blocks Introduction
Programming Building Blocks | Description |
---|---|
Wireless communication, initialization block, which needs to be run before using other wireless blocksSet wireless channel (only boards on the same channel can communicate) Parameter range: 1~13 | |
Get wireless message, which will be cleared after being used once, until the next wireless message is received | |
Wait for wireless message arrival and return | |
Send wireless message |
Case 1 - Wireless light switch
Effect: Need two micro:bits, download the receiver and transmitter programs, and press the buttons A and B on the receiver micro:bit to turn on and turn off the colored lights on the other micro:bit
Program - Transmitter
Program - Receiver
Case 2 - Anti-lost Device for Kids
Effect: When the two Grape boards exceed the distance and cannot communicate, the parent's Grape board will raise an alarm.
Program - Parent Side
Program - Child Side