Case 10: The XGO Eatting Bones
Contents
14. Case 10: The XGO Eatting Bones#
14.1. Introduction#
Hi guys, we know that dogs like bones very much, how can we program to achive a similar situation? We’ve put this idea into practice in this project, and you can do more projects with your ideas.
14.2. Quick to Start#
Materials Required#
micro:bit × 1
Working Principle#
Two micro:bits are required in this project, we will create to programs with one for radio transmitter and another for receiving the signal.
The closer the receiving end is to the transmitter end, the stronger the radio signal will be, if the signal is strong, it means that another micro:bit may be very close. If the radio signal is weak, the other micro:bit is probably far away.
Hardware Connections#
Connect the micro:bit with the computer through the USB cable.
14.3. MakeCode Programming#
Step 1#
Click ” Advanced“ in the MakeCode drawer to see more choices.
We need to add a package for programming. Click “Extensions” in the bottom of the drawer and search with “XGO” in the dialogue box to download it.
Note: If you met a tip indicating that some codebases would be deleted due to incompatibility, you may continue as the tips say or create a new project in the menu.
Step 2#
Sample Code#
XGO Code#
Link: xgo
You may download it directly below:
“ Bones“ Code#
Link: Bones
You may download it directly below: