Project 4 XGO Wave Hand

Ⅰ. Teaching Aims

  1. Recognize the three joints of Upper / Middle / Lower, and focus on the combined control of Middle and Lower.

  2. While sitting, wave the claw three times by repeat.

  3. After the action is completed, play a beeping sound as multimodal feedback.

  4. Understand the importance of XGO reset pose for clearing cumulative errors.

Ⅱ. Pre-class Check

  • XGO + Foxbit + MicroBlocks IDE.

  • XGO battery power ≥ 60 %.

  • MicroBlocks status bar shows a green dot, and the development board model is Foxbit.

  • Test XGO init and XGO reset pose.

  • Leave a gap in front of the desktop to prevent the claw from hitting objects.

Ⅲ. Key Blocks Analysis

Img

Functions

Make the dog sit steadily

Tips

It’s safer to sit firmly before waving claw

Img

Functions

The front paws swing back and forth

Parameter sample

30 / −30 / 0

Tips

angle > 0 = Wave forward

Img

Functions

Flexion and extension of the wrist

Parameter sample

10 / 0

Tips

Change posture in coordination with Middle

Img

Functions

The sequence of circular claw swings

Parameter sample

3 times

Tips

At the end of the loop,
be sure to return to the original position

Img

Functions

Give the servo time to be in place

Parameter sample

500 ms

Tips

delay ≥ 300 ms for clearer movement

play tone Note ms

Functions

Beeping sound

Parameter sample

G5 120 ms

Tips

Put it after the loop

Ⅳ. Test: Waving While Sitting

  1. Drag in the initialization block: when started XGO init XGO reset pose XGO action Sit Down

  2. Piece the main action logic as shown:

    Img

  3. Click ▶Run, and the dog will “wave while sitting × 3” and then reset.

Online code: Click here

Ⅴ. Quiz

  1. Why must Sit Down first and then wave the claw?

  2. What will happen if the Lower joint is not reset to 0° and this cycle is repeated many times?

  3. How to change “wave once” into a waveOnce() custom Block, and then call it by repeat?

Ⅵ. FAQ

Questions

Possible causes

Solutions

Sit down but do not wave

repeat is empty or omits joint instructions inside

Check the loop content

The amplitude is too small

Middle° is too low

Set up to 25–35°

“wrist” is not bent

Lower° = 0°

set 8–12°

The servo is shaking/screaming

The angle exceeds the limit or touches the table

Reduce the angle and remove the obstacle

The second and third movements are deformed

There is a lack of reset within the loop

After each waving, set Middle, Lower = 0°

The program ends in a strange posture

Forgot XGO reset pose

Add it before the end