12. Case 08: The “Trembling” XGO#

../../_images/xgo-8-1.png

12.1. Introduction#

Hi guys, you might know how to operate XGO already from the previous lessons. In this project, we will try programming XGO to give us the responses as a “real” pet dog, the dog would tremble if they feel cold, let’s try making a “trembling” XGO!

12.2. Quick to Start#

Materials#

micro:bit XGO Robot Kit × 1

Working principle#


We use a data cable (USB cable) to connect the computer with the micro:bit, I believe you are already very skilled.

../../_images/microbit-xgo-robot-kit-22.png

12.3. MakeCode Programming#


Step 1#

Click “Advanced” in the MakeCode to see more choices.

../../_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-8-2.png

Link: A Light-controlled Dog

You can also download it directly below:

***Note:***The setting of the temperature value in the program depends on the current ambient temperature you are in. If there is no heating device, you can consider placing your palm on the micro:bit. After a minute or two, the micro:bit will The temperature will increase by 1-2 degrees.

Projects Display#

FAQ#

Exploration#

How to program to make the XGO walk away after lying down for a while?