# Case 01 - Run in A Square Routine ## 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. ## Quick to Start ### Materials [micro:bit XGO Robot Kit ](https://shop.elecfreaks.com/products/elecfreaks-micro-bit-xgo-robot-kit?_pos=1&_sid=c796ff3f3&_ss=r) × 1 [micro:bit](https://www.elecfreaks.com/bbc-micro-bit-board-for-coding-programming-microbit.html) × 1 ### Hardware Connections --- Connect the micro:bit with the computer. Believe you are already very skilled. ![](./images/microbit-xgo-robot-kit-22.png) ## MakeCode programming --- ### Step 1 Click Advanced in MakeCode to see more options. ![](./images/microbit-xgo-robot-kit-10.png) 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. ![](./images/microbit-xgo-robot-kit-11.png) ***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 ![](./images/xgo-1-2.png) Link[Run in A Square Routine](https://makecode.microbit.org/_3WaJt82pkbqd) You can also download it directly below:
## FAQ If XGO doesn't run a perfect square, please try adjusting the time and speed. ## Exploration How to program it to run in circles?