4. Case 01 - Run in A Square Routine#

4.1. Purpose#

Hello, in this class we are about to learn to program and control XGO, we will make XGO do more interesting things and make it our best friend. In this lesson, we programmed XGO to move forward quickly. Of course, if you want XGO to turn and adjust the code, let’s start.

4.2. Quick to Start#


micro:bit XGO Robot Kit × 1

micro:bit × 1

Hardware Connections#

Connect the micro:bit with the computer. Believe you are already very skilled.


4.3. MakeCode programming#

Step 1#

Click Advanced in MakeCode to see more options.


For programming, we need to add a package: click “Extensions” at the bottom of the MakeCode drawer, search for “XGO” in the dialog to download.


Note: If you encounter a prompt that some codebases will be removed due to incompatibility, you can follow the prompt to continue or create a new project in the menu.

Step 2#

sample program#


LinkRun in A Square Routine

You can also download it directly below:

4.4. FAQ#

If XGO doesn’t run a perfect square, please try adjusting the time and speed.

4.5. Exploration#

How to program it to run in circles?