2. Hardware Assembly#
Connect the micro:bit with the Ring:bit V2 with the shorter screws.
Fix the 7-hole bricks with the XGO with the longer screws.
Fix the Ring:bit V2 on the 7-hole bricks with the shaft pins.
Connect the Dupont cables with the Ring:bit V2(Note to connect in the right connections: G for black, blue for port 1 and yellow for port 2)
Connect the micro:bit with the computer through USB cables.
The program platform here we use for XGO is Makecode in the graphical programming, you can choose to program in Python or JaveScript too.
2.2. Add XGO Package#
Create a new project, click Advanced in the drawer to see more choices.
Click extensions in the drawer:
Search with XGO and download it:
Note: If you do not get corresponding results by searching for XGO, you can enter：https://github.com/elecfreaks/pxt-xgo
The program blocks of XGO are listed below:
After programming, connect the micro:bit with the computer and download it to the micro:bit board.
2.3. Program Guidance#
Set the actions of XGO, there are 12 kinds of actions and you can select any one from them.
Get the angles of each joint on the limbs and get the power status of XGO.
The debug mode of the servos(the specific servo or all servos) on the limbs.
Turn on/off the performance mode and the gyroscope for XGO.
Stop the periodic rotation of XGO around the X/Y/Z axis.
Set the rotation degrees/time of XGO around the X/Y/Z axis.
Set the time of the translation/going back and forth/moving of the XGO around the X/Y/Z axis.
Set the time and height of the limbs being lifted.
Set the direction, speed and time of the rotation of XGO.
Set the direction of the feet of XGO.
Set the speed of the servos on the joints and the walking frequency of XGO.
Set the speed of moving or rotating for XGO.
Set the height of XGO
2.4. Project Samples#
You can also download it directly below:
Note: Turn on the Ring:bit V2 before running the program and note if the power is sufficient.