Micro:Bit
Communication
Using the radio frequencies on the Micro:Bit is quite easy. It allows the Micro:Bits to talk to each other.
1. One Micro:Bit is a "sender"
2. One Micro:Bit is the "receiver".
First, both Micro:Bits need to be set to the same radio frequency. This is usually done in the "on start" group. Make sure no other classmates are using the same radio frequency. The radio frequency IDs can range between 1-255.
1. One Micro:Bit is a "sender"
2. One Micro:Bit is the "receiver".
First, both Micro:Bits need to be set to the same radio frequency. This is usually done in the "on start" group. Make sure no other classmates are using the same radio frequency. The radio frequency IDs can range between 1-255.
To send a message use the commands in the radio group in your toolbox in the "send" section. This will broadcast a message to your assigned radio frequency.
To receive a message, use the commands in the radio group in your toolbox in the "receive" section. This will receive messages broadcast to the assigned radio frequency.
This code will broadcast the number 4 to the assigned radio frequency from Micro:Bit 1, and is received and displayed on Micro:Bit 2.
To receive a message, use the commands in the radio group in your toolbox in the "receive" section. This will receive messages broadcast to the assigned radio frequency.
This code will broadcast the number 4 to the assigned radio frequency from Micro:Bit 1, and is received and displayed on Micro:Bit 2.
TRY IT YOURSELF:
Use the temperature input to display the current temperature in Celsius. If button 'A' is pressed send the current temperature in Celsius to the other Micro:Bit 2. If button 'B' is pressed, send the current temperature in Fahrenheit to Micro:Bit 2.
Temperature conversion = Fahrenheit = Celsius *1.8 + 32
Download the file and submit to MS teams.
Use the temperature input to display the current temperature in Celsius. If button 'A' is pressed send the current temperature in Celsius to the other Micro:Bit 2. If button 'B' is pressed, send the current temperature in Fahrenheit to Micro:Bit 2.
Temperature conversion = Fahrenheit = Celsius *1.8 + 32
Download the file and submit to MS teams.