21.7. The Combat Cart-4#

Purpose#

Use the cutebot smart car to create a cart that can push opponents off the playing field or lose their ability to move.

../../../_images/cutebot-case-29-01.png

Materials#

1 × Cutebot smart car

1 × Cutebot lithium battery pack

n × Building blocks (blocks need to be prepared by yourself)

Assembly#

The installation steps of lithium battery pack:#

../../../_images/cutebot-step-01.png

Construction steps of the building blocks:#

Parts List:

../../../_images/cutebot-case-29-step-01.png

Build steps:

../../../_images/cutebot-case-29-step-02.png

../../../_images/cutebot-case-29-step-03.png

../../../_images/cutebot-case-29-step-04.png

../../../_images/cutebot-case-29-step-05.png

../../../_images/cutebot-case-29-step-06.png

../../../_images/cutebot-case-29-step-07.png

../../../_images/cutebot-case-29-step-08.png

../../../_images/cutebot-case-29-step-09.png

../../../_images/cutebot-case-29-step-10.png

../../../_images/cutebot-case-29-step-11.png

Connection method#

Connect the servo to the S1 of the cutebot smart car.

../../../_images/cutebot-case-26-10.png

Software#

MicroSoft Makecode

Program#

Add extension#

Click “Advanced” in the drawer of MakeCode to see more choices.

../../../_images/cutebot-case-24-01.png

For programming, we need to add a package. Click “Extensions” at the bottom of the drawer and then search Cutebot in the dialogue box to download it.

../../../_images/cutebot-case-24-02.png

For programming, we need to add a package. Click “Extensions” at the bottom of the drawer and then search Joystick:bit V2 in the dialogue box to download it.

../../../_images/cutebot-case-22-03.png

Note: If you get a warning indicating some packages will be removed because of incompatibility issues, you can follow the prompts or create a new project in the menu.

Program#

Cutebot#

../../../_images/cutebot-case-26-04.png

Link: https://makecode.microbit.org/_6kD6KAaEfA8W

You can also download the program directly from the following webpage.

Remote control#

../../../_images/cutebot-case-26-05.png

Link: https://makecode.microbit.org/_6fy3K4Xctdgz

You can also download the program directly from the following webpage.

Result#

If you control the driving direction of the car by the rocker of the remote control, press the C/D button of the remote control to control the servo action.