Download the send_code program to bit1 and receiver_code program to bit2 and see
what happens.
Blocks Overview
Send_code(bit1):
1. Set radio group for micro:bit.
2. Send corresponding code based on different gesture detected.
3. If the touch sensor is touched(1), send number 4.
4. If the switch is pressed(1), send number 5.
5. If the switch pops up(0), send number 6.
Receiver_code(bit2):
1. Set radio group of micro:bit.
2. If the number received is 1, the servo shaft rotates to 90 degrees and a forward picture is
displayed on the micro:bit matrix LEDs.
3. If the number received is 2, the servo shaft rotates to 0 degrees and a left picture is
displayed on the micro:bit matrix LEDs.
4. If the number received is 3, the servo shaft rotates to 180 degrees and a right picture is
displayed on the micro:bit matrix LEDs.
5. If the number received is 4, play a melody in background.
6. If the number received is 5, turn LED on.
7. If the number received is 6, turn LED off.
When the bit1 logo tilts down, the matrix LED on bit2 displays the forward
picture and the servo rotates to 90 degrees; when bit1 tilts to the left, the
matrix LED on bit2 displays the left picture and the servo rotates to 0
degrees; when bit1 tilts to the right, the matrix LED on bit2 displays the right
picture and the servo rotates to 180 degrees; when you press the touch
sensor connected to bit1, the buzzer connected to bit2 will play the melody.
When you press the switch connected to bit1, the LED connected to bit2 will
light up. When you pop the switch, the LED will go out.
Result
Try to use what you have learned in this project to make a real remote control car!
48