Skip to main content

Explanation of XGO library building block commands

This document is written for creators who are new to XGO graphical programming, and the purpose is to let users have a detailed understanding of each building block command of the XGO library.

Distributedblock commandillustrate
Basic commandsThe communication between XGO-lite and micro:bit is through the serial port. So first you need to set the TX (send) and RX (receive) port numbers of the communication serial port.
XGO-lite V2 defaults to TX-14, RX-13;
XGO-lite V1 defaults to TX-2, RX-1;
So when programming different XGO-lite versions , to select the corresponding TX, RX serial port numbers.
XGO-lite has 19 standard actions by default, and these actions will not be interrupted during execution.
What is obtained is the version number of the firmware driver of the XGO-lite lower computer, and the returned data type is a string.
Get the battery level of the current state of XGO-lite.
Restore to the state after the XGO-lite is powered on and stabilized.
"Dynamic balance mode" means that when the plane on which XGO-lite stands shakes, XGO-lite will dynamically adjust the angle of the quadruped servo to keep the fuselage parallel to the ground within a certain range. However, when performing other actions, the dynamic balance mode is turned off by default.
Set the steering gearRecord all the servo angle values of the current XGO-lite into the variable "pose#".
Set all servo angles of XGO-lite to the servo angle values saved in the variable "pose#".
Get the servo angle value of each joint of XGO-lite's four legs.
Changing the value of "Servo Speed" will affect the block commands that directly control the servo.
Changing the value of "stepping frequency" will affect the command of the building block that controls the action.
Servo "load" means to make the joint servo generate driving force, and "unload" the servo means to make the servo lose driving force. This building block command is applied to all joint servos of XGO-lite.
This building block command acts on the joint servos of each leg of XGO-lite.
Set the body height of XGO-lite, when the input value is 0, the body height is the lowest when the input value is 100, the body height is the highest.
sportsSet XGO-lite to keep its four legs still, and its body to rotate back and forth around the X\Y\Z axis. The larger the period input value, the slower the rotation speed.
Stop XGO-lite from rotating around the X\Y\Z axis.
Set left-right rotation. The larger the input value of the speed (0~150), the faster the rotation; the rotation time is the input time value.
Set the angle (-20~20) that XGO-lite rotates around X\Y\Z to the input value.
Set XGO-lite to move without moving four feet, and to move back and forth in X\Y\Z direction with the input time value as a period.
Stop XGO-lite body reciprocating translation in X\Y\Z direction.
Set XGO-lite to perform forward\backward\leftward\rightward translational movement, and the period is the input time value. The larger the step length (5~25mm), the larger the range of motion.
Set the XGO-lite to keep its four legs still, and the body moves in the X(-35~35mm) \ Y(-18~18mm) \ Z(75mm~115mm) direction within the corresponding direction range.
Set XGO-lite to perform the stepping action at different body heights (11~35mm), and the action execution time is the input time value.
Set XGO-lite to different body heights (11~35mm) to perform standing movements.
Set the X\Y\Z position of the XGO-lite leg toe.
Set XGO-lite to perform left/right rotation, and the speed is the input value (0~150). If XGO-lite does not execute other commands, it will keep rotating.
Set XGO-lite to execute forward\backward\left move\right move direction translation movement, the larger the input step value, the faster the speed. If XGO-lite does not execute other commands, it will keep moving in translation.
Set the servo angle of each joint of XGO-lite's four legs, the range (-70~90).
Set XGO-lite to move forward\backward\left\right, and the speed is the input value (0~100).
Set XGO-lite to rotate left\right, and the speed is the input value (0~100).
Robotic Arm (V2)When XGO-lite V2 turns on self-stabilization, the position of the gripper will remain unchanged when the height of the mechanical dog changes.
Set the moving distance of the XGO-lite V2 robotic arm in the X-axis direction, and take the gripper as the observation object.
Set the moving distance of the XGO-lite V2 robotic arm in the Z-axis direction, and take the gripper as the observation object.
Set the retraction distance of the XGO-lite V2 robotic arm gripper to the middle.