Skip to main content

Case 10: The XGO Eatting Bones

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.

Quick to Start


Materials Required

micro:bit XGO Robot Kit × 1

micro:bit × 1

Working Principle

  1. Two micro:bits are required in this project, we will create to programs with one for radio transmitter and another for receiving the signal.
  2. 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.

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:

Projects Display

Relevant Files

Exploration