# Case 16: The Road Sweeper ## Purpose --- To make a road sweeper. ![](./images/case-16-01.png) ## Link: --- [micro:bit Wonder Building Kit](https://shop.elecfreaks.com/products/elecfreaks-micro-bit-32-in-1-wonder-building-kit-without-micro-bit-board?_pos=5&_sid=2094afd2f&_ss=r) ## Materials Required --- ![](./images/case-16-02.png) Video link: [https://youtu.be/kdY41mPGvRI](https://youtu.be/kdY41mPGvRI) ## Bricks build-up --- ![](./images/step-case-16-01.png) ![](./images/step-case-16-02.png) ![](./images/step-case-16-03.png) ![](./images/step-case-16-04.png) ![](./images/step-case-16-05.png) ![](./images/step-case-16-06.png) ![](./images/step-case-16-07.png) ![](./images/step-case-16-08.png) ![](./images/step-case-16-09.png) ![](./images/step-case-16-10.png) ![](./images/step-case-16-11.png) ![](./images/step-case-16-12.png) ![](./images/step-case-16-13.png) ![](./images/step-case-16-14.png) ![](./images/step-case-16-15.png) ![](./images/step-case-16-16.png) ![](./images/step-case-16-17.png) ![](./images/step-case-16-18.png) ![](./images/step-case-16-19.png) ![](./images/step-case-16-20.png) ![](./images/step-case-16-21.png) ![](./images/step-case-16-22.png) ![](./images/step-case-16-23.png) ![](./images/step-case-16-24.png) ## Hardware Connection Connect a [motor](https://www.elecfreaks.com/geekservo-motor-2kg-compatible-with-lego.html) to M1 port on [Wukong breakout board](https://www.elecfreaks.com/wukong-board-with-lego-holder-for-micro-bit.html). ![](./images/Wonder-Building-Kit-case-16-06.png) ## Software Platform --- [MakeCode](https://makecode.microbit.org/) ## Coding --- ### Add extensions Click "Advanced" in the MakeCode to see more choices. ![](./images/case-01-03.png) Search with Wukong in the dialogue box to download it. ![](./images/case-01-04.png) ### Program ![](./images/case-16-05.png) Link:[https://makecode.microbit.org/_18WVrTE5LTzb](https://makecode.microbit.org/_18WVrTE5LTzb) ### Result When button A is pressed, the sweeper moves forward and starts sweeping, when button B is pressed, the sweeper stops moving and ends sweeping.