Skip to main content

The Tail of the TPBot

Purpose

搭To build a TPBot with a tail.

Materials Requested

TPBot Smart Car

360 degrees servo

Bricks Pack

Assembly Steps

Hardware Connections

Connect the 360° servo to servo 1 port on the TPBot.

Software

Microsoft makecode

Program

Click "Advanced" in the makecode drawer to see more choices.

For programming the TPBot, we need to add the extensions. Click "Extensions" at the bottom of the drawer and search with tpbot in the box, then download it.

Samples program

While on start, set to show an icon and while pressing button A, make the cart drive forward and while pressing button B, make the cart stops driving; in forever block, set the servo to drive to 200 degrees, pause for 200ms, set the servo to drive to 160 degress and pause another 200ms.

Program

Reference program: https://makecode.microbit.org/_HzrR61h65b94

You may download it directly here:

Conclusion

The TPBot starts shaking the tail after powering on, while pressing button A, TPBot drives forward and press button B to stop it.