Project 7 XGO Does Gymnastics
Ⅰ. Teaching Aims
Understand the six-degree-of-freedom spatial posture of XGO (X, Y, Z translation + Pitch, Roll, Yaw rotation).
Master the instructions of slide body and rotate body and their positive and negative directions.
Learn to control “forward and backward displacement”, “left and right displacement” and “up and down push-ups” respectively through three independent examples.
Use
XGO reset poseto eliminate cumulative errors and ensure a return-to-zero position after the action.
Ⅱ. Pre-class Check
XGO + Foxbit + MicroBlocks IDE.
XGO battery power ≥ 60 %. The robot stands in the center of a flat table, with a space of no less than 20 cm around it.
MicroBlocks status bar shows a green dot, XGO-lite extension is loaded and the development board model is Foxbit.
Manually run
XGO reset poseonce to confirm the zero position.
Ⅲ. Key Blocks Analysis
|
|
|---|---|
Functions |
forward and backward displacement |
Value range |
−25 ~ +25 |
“+” Direction |
Forward |
|
|
Functions |
left and right displacement |
Value range |
−25 ~ +25 |
“+” Direction |
Left |
|
|
Functions |
up and down push-ups |
Value range |
−25 ~ +45 |
“+” Direction |
Up |
|
|
Functions |
Head down and head up (Pitch) |
Value range |
−20 ~ +20 |
“+” Direction |
Head up |
Formulas:
• slide X “+ forward − backward”
• slide Y “+ left − right”
• slide Z “+ up − down”
• rotate X “+ head up − head down”
Ⅳ. Practice (Independent Operation)
Each section includes initialization, action, waiting, and reset.
Test 1: Forward/Backward Displacement (slide body X)

Online code: Click here
Test 2: Left/Right Displacement (rotate body x)

Online code: Click here
Test 3: Dog Push-ups

Debugging tips:
If the dog sinks too much in a push-up, it will slip. → Adjust
100to60.The speed is too fast to see clearly → Change the two
waitto1000 ms.
Online code: Click here
Ⅴ. FAQ
Questions |
Possible causes |
Solutions |
|---|---|---|
The movement is not obvious. |
The parameter is too small / |
slide ≥ 6 mm,rotate ≥ 8°; |
The front feet are raised |
The Pitch is large, but Z has not sunk |
Sink synchronously by 5–10 mm to balance the center of gravity |
The servo is screaming. |
Maintain an extreme posture for a long time |
Shorten the waiting time and |

