10. Case 07: Here Comes the Police#

10.1. Purpose#

  • Programme to let the TPBot be a “police car”.

10.2. Material#


10.3. Software#


10.4. Programming#

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


  • We need to add a package for programming. Click “Extensions” in the bottom of the drawer and search with “tpbot” in the dialogue box to download it.



  • Set a smile face on the micro:bit and set it moving forward at the speed of 100%.

  • Set the headlights in red and pause for 100ms in the forever brick; then set them in blue and pause for 100ms.



  • Power up to set the TPBot driving forward with the headlights alternating showing red and bule.

10.5. Exploration#

10.6. FAQ#

10.7. Relevant File#