XGO Rider Micro:bit Self Balancing Robot | World’s first palm-sized two-wheel legged robot

Hello and welcome back. In this project, I’m gonna show you an advanced self-balancing robot provided by Elecfreaks. It’s called the XGO Rider, a programmable bipedal robot designed for education and entertainment. This is the world’s first palm-sized two-wheel legged robot. This robot is mainly based on the Microbit, and we can easily connect the Microbit board to the robot. Also, we can easily upload programs to this robot. For that, we can use MakeCode, MicroBlocks, or Python. In this project, I used the MakeCode platform because it’s a very easy, code-block-based platform.
Especially, we can control this robot using your smartphone or a Bluetooth remote. I used my phone to control the XGO robot. It’s very smooth, and the balancing is super accurate. We can use this robot for up to 3 hours on a full charge. Therefore, we can have a great experience using this robot. If you want more info about the XGO Rider robot, please use this link.
Ok, let’s prepare the XGO Rider robot. If you don’t have one yet, you can buy it using the link below.
- XGO Rider — Buy
Step 1
Firstly, unbox your robot and identify the components inside the box.







Step 2
Secondly, fully charge your robot using the USB Type-C cable.


Step 3
Thirdly, connect the Micro:bit to the front of the robot. Then, connect it to your computer.




Step 4
Now, open the MakeCode platform using your favorite browser. Then, create a new project with any name you like.


Step 5
Next, add the XGO Rider extension to your project.



Step 6
Afterward, copy and paste the following Python script into the Python tab. Then, you’ll see the auto-generated code blocks appear.
- Python script — Download
def on_button_pressed_a():
xgo.execute_actions(xgo.posture.ADVANCE_AND_RETREAT)
input.on_button_pressed(Button.A, on_button_pressed_a)
def on_button_pressed_b():
xgo.execute_actions(xgo.posture.UPS_AND_DOWNS)
input.on_button_pressed(Button.B, on_button_pressed_b)
def on_logo_touched():
xgo.execute_actions(xgo.posture.LIFT_ROTATION)
input.on_logo_event(TouchButtonEvent.TOUCHED, on_logo_touched)
xgo.init_xgo_serial(SerialPin.P14, SerialPin.P13)
xgo.set_led_mode(xgo.LEDNumber.ALL, 0x00ffff)
basic.show_icon(IconNames.ASLEEP)



Step 6
Next, connect your device to the MakeCode platform. Then, click the download button to upload the code.





Step 7
Finally, unplug the USB cable and power on your robot. Make sure to place your robot on a stable, wide surface. Now, you’ll see your self-balancing robot in action!



Step 8
Also, you can control this robot using the XGO Rider app. You can download it from the Play Store or App Store.


Ok, enjoy your robot! The full video guide is below, and we hope to see you in the next project. Have a great day!
XGO Rider Micro:bit Self Balancing Robot | World’s first palm-sized two-wheel legged robot