Skip to main content

TPbot Catapult

Purpose

To build a TPBot Catapult.

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.

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 for program

While on start, set to show an icon, while button A being pressed, make the servo connecting to S1 drive to 180 degrees; while button B being pressed, set the servo connecting with S1 to ratote to 270 degrees.

Program

Reference link: https://makecode.microbit.org/_abKfLKhV4V99

You may download it directly here:

Conclusion:

While pressing button A, the catapult shots out the ball; while pressing button B, the catapult lies down.