7. Case 03: Dance in Figure-of-eight#

7.1. Purpose#


  • Make your Cutebot move in the figure-of-eight.

  • Cutebot is a car with three wheels and the direction is adjusted by the different speed of the left and right wheels.

7.2. Materials#


7.3. Software Platform#


MicroSoft makecode

7.4. Programming#


Step 1#

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

../../_images/cutebot-pk-13.png

  • A codebase is required for Cutebot programming, click “Add Package” at the bottom of the drawer, search Cutebot in the dialogue box and download it.

../../_images/cutebot-pk-111.png

Note: If you met a tip indicating incompatibility of the codebase, you can continue with the tips or build a new project there.

Step 2#

  • Choose “show icon” in the On startbricks. ../../_images/case_01_022.png

Step 3#

  • Drag “go straight at full speed” and “set left wheel speed, right wheel speed” bricks into the Forever brick in turns.

  • Divide the “figure-of eight” track into six parts: move forward for 200ms at the beginning, set the speed of the left wheel is faster than the right and set to move for 1000ms after, then go straight for 200ms. Right now you have completed the half part of “figure-of-eight”.

  • Complete the second half part of “figure-of-eight” in a similar way.

../../_images/case_03_013.png

Programming#

Links: https://makecode.microbit.org/_RRabUPAUjUpD

You can also download it directly below:

7.5. Result#


  • The Cutebotmoves in the “figure-of-eight”.

7.6. Exploration#


  • How to program if we want to make the Cutebot move in a square shape?

7.7. FAQ#


7.8. Relevant Files#