30. Case 28:The Wiper

30.1. Purpose


Make a wiper.

../../_images/Wonder-Building-Kit-case-28-01.png

30.3. Materials Required


../../_images/Wonder-Building-Kit-step-case-28-01.png

30.4. Bricks build-up


../../_images/Wonder-Building-Kit-step-case-28-02.png

../../_images/Wonder-Building-Kit-step-case-28-03.png

../../_images/Wonder-Building-Kit-step-case-28-04.png

../../_images/Wonder-Building-Kit-step-case-28-05.png

../../_images/Wonder-Building-Kit-step-case-28-06.png

../../_images/Wonder-Building-Kit-step-case-28-07.png

../../_images/Wonder-Building-Kit-step-case-28-08.png

../../_images/Wonder-Building-Kit-step-case-28-09.png

../../_images/Wonder-Building-Kit-step-case-28-10.png

../../_images/Wonder-Building-Kit-step-case-28-11.png

../../_images/Wonder-Building-Kit-step-case-28-12.png

../../_images/Wonder-Building-Kit-step-case-28-13.png

../../_images/Wonder-Building-Kit-step-case-28-14.png

../../_images/Wonder-Building-Kit-step-case-28-15.png

../../_images/Wonder-Building-Kit-step-case-28-16.png

../../_images/Wonder-Building-Kit-step-case-28-17.png

../../_images/Wonder-Building-Kit-step-case-28-18.png

30.5. Hardware Connection

Connect a motor to M1 port on Wukong breakout board.

../../_images/Wonder-Building-Kit-case-28-06.png

30.6. Software Platform


MakeCode

30.7. Coding


Add extensions

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

../../_images/Wonder-Building-Kit-case-21-02.png

Search with Wukong in the dialogue box to download it.

../../_images/Wonder-Building-Kit-case-21-03.png

Result

When the micro:bit is powering on, it displays a heart icon. When button A is pressed, the wiper starts driving; when button A is pressed again, the wiper accelerates; and when button B is pressed, the wiper decelerates.