Interactions Between Two Microbits & Connect Scratch with Microbit
Interactions between two microbits
To make a project that uses communication between two Microbits, I chose a project from the list, which is called Heartbeat beacon. A heart pattern will show up in a microbit when it receives a string signal from another microbit.
At the start, I prepared two microbits: one as a receiver, one as a transmitter. They had the same preset code to set the radio set group and radio set transmit power. For the transmitter, there is a forever loop to transmit radio. For the receiver, there is a trigger to show a heart icon when it receives a string signal.
For fun, I modified the code. After sending a string, the transmitter will send a number. It is still a forever loop. At the same, I added a new code to the receiver, making it react to the number signal showing a smile icon.
1. radio & basic are two objects. Basic refers to microbits
2. block names are method names
3. nested structures are wrapped by (function( ){ })
4. values (numbers, patterns) are arguments
Comments
Post a Comment