Case 01 - Run in A Square Routine
Contents
5. Case 01 - Run in A Square Routine#
5.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.
5.2. Quick to Start#
Materials#
micro:bit × 1
Hardware Connections#
Connect the micro:bit with the computer. Believe you are already very skilled.
5.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#
You can also download it directly below:
5.4. FAQ#
If XGO doesn’t run a perfect square, please try adjusting the time and speed.
5.5. Exploration#
How to program it to run in circles?