# Case 07: Here Comes the Police ## Purpose --- - Programme to let the TPBot be a "police car". ## Material --- - 1 x [TPBot](https://shop.elecfreaks.com/products/elecfreaks-micro-bit-tpbot-car-kit-without-micro-bit-board?_pos=1&_sid=f32828112&_ss=r) ![](./images/TPBot_tianpeng_case_01_01.png) ## Software --- [MicroSoftmakecode](https://makecode.microbit.org/#) ## Programming --- - Click "Advanced" to see more choices in the MakeCode drawer. ![](./images/TPBot_tianpeng_case_01_02.png) - 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. ![](./images/TPBot_tianpeng_case_01_03.png) ### Sample - 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. ![](./images/TPBot_tianpeng_case_07_04.png) ### Link - Link: [https://makecode.microbit.org/_6AT0J1Yx99rm](https://makecode.microbit.org/_6AT0J1Yx99rm) - You may also download it directly below:
### Conclusion - Power up to set the TPBot driving forward with the headlights alternating showing red and bule. ## Exploration --- ## FAQ --- ## Relevant File ---