4. Assemble the hardware#

4.1. Step 1#

  • Attach the micro:bit to the Ring:bit expansion board using the short flat head screws.

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

4.2. Step 2#

  • Use the longer flat head screws to fasten the seven-hole beam to the corresponding screw holes on the XGO.

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

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

4.3. Step 3#

  • Mount the Ring:bit expansion board with the micro:bit installed on the seven-hole beam using the long pins.

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

4.4. Step 4#

  • Connect the DuPont cable reserved by XGO to the corresponding port of the Ring:bit, among which the black DuPont cable is connected to the G port, and the yellow DuPont cable and the blue DuPont cable are connected to the No. 1 and No. 2 ports. Select the appropriate port number.

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

4.5. Step 5#

  • Connect your computer to the micro:bit with a USB cable:

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

Start Program#

The programming of XGO is done on the Makecode platform; the Makecode platform can use graphical programming, as well as python code programming and JavaScript code programming;

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

4.6. Add XGO extension library#

The steps are as follows:#

  • Create a new program, name the program name and click the Advanced button in the building block library, as follows:

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

4.7. Programming Guide#

Initialize XGO

../../_images/microbit-xgo-robot-kit-square-24.png

Set XGO actions, a total of 12 actions, you can choose one action;

../../_images/microbit-xgo-robot-kit-square-01.png

Get the servo angle of XGO’s limb joints and get the current power of XGO;

../../_images/microbit-xgo-robot-kit-square-02.png

../../_images/microbit-xgo-robot-kit-square-03.png

Set XGO single leg servo loading and all leg servos to debug mode;

../../_images/microbit-xgo-robot-kit-square-04.png

../../_images/microbit-xgo-robot-kit-square-05.png

Turn on or off the performance mode of XGO;

../../_images/microbit-xgo-robot-kit-square-06.png

Turn on or off the XGO’s gyroscope;

../../_images/microbit-xgo-robot-kit-square-07.png

Stop the XGO cycle reciprocating around the X, Y, Z axes;

../../_images/microbit-xgo-robot-kit-square-08.png

Set the time and degree of XGO reciprocating rotation around X, Y, Z axes;

../../_images/microbit-xgo-robot-kit-square-09.png

../../_images/microbit-xgo-robot-kit-square-10.png

Set the time for XGO to pan or stop and move in the X, Y, Z directions;

../../_images/microbit-xgo-robot-kit-square-11.png

../../_images/microbit-xgo-robot-kit-square-12.png

../../_images/microbit-xgo-robot-kit-square-13.png

Set the distance and time of the XGO leg raise;

../../_images/microbit-xgo-robot-kit-square-14.png

../../_images/microbit-xgo-robot-kit-square-15.png

Set the direction, speed and time of XGO’s rotational motion;

../../_images/microbit-xgo-robot-kit-square-16.png

../../_images/microbit-xgo-robot-kit-square-17.png

../../_images/microbit-xgo-robot-kit-square-18.png

../../_images/microbit-xgo-robot-kit-square-19.png

Set the toe direction of the XGO quadruped;

../../_images/microbit-xgo-robot-kit-square-20.png

Set the servo rotation of the XGO quadruped joint and set the servo speed or step frequency;

../../_images/microbit-xgo-robot-kit-square-21.png

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

Set the XGO movement or rotation and the corresponding speed;

../../_images/microbit-xgo-robot-kit-square-23.png

../../_images/microbit-xgo-robot-kit-square-26.png

set XGO body height;

../../_images/microbit-xgo-robot-kit-square-25.png

Simple example#

../../_images/microbit-xgo-robot-kit-square-28.png

Link:XGO

At the same time, you can directly download the program below;

4.8. FAQ#

Note: If you want to run the numbered code program, you need to turn on the switch of Ring:bit, and also pay attention to whether the power of XGO is sufficient