24. Case 22: The Helicopter#

24.1. Purpose#


Make a helicopter.

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

24.3. Materials Required#


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

24.4. Bricks build-up#


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

../../_images/Wonder-Building-Kit-step-case-22-19.png

../../_images/Wonder-Building-Kit-step-case-22-20.png

../../_images/Wonder-Building-Kit-step-case-22-21.png

../../_images/Wonder-Building-Kit-step-case-22-22.png

../../_images/Wonder-Building-Kit-step-case-22-23.png

../../_images/Wonder-Building-Kit-step-case-22-24.png

../../_images/Wonder-Building-Kit-step-case-22-25.png

../../_images/Wonder-Building-Kit-step-case-22-26.png

../../_images/Wonder-Building-Kit-step-case-22-27.png

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

../../_images/Wonder-Building-Kit-step-case-22-29.png

../../_images/Wonder-Building-Kit-step-case-22-30.png

../../_images/Wonder-Building-Kit-step-case-22-31.png

../../_images/Wonder-Building-Kit-step-case-22-32.png

../../_images/Wonder-Building-Kit-step-case-22-33.png

../../_images/Wonder-Building-Kit-step-case-22-34.png

../../_images/Wonder-Building-Kit-step-case-22-35.png

../../_images/Wonder-Building-Kit-step-case-22-36.png

../../_images/Wonder-Building-Kit-step-case-22-37.png

../../_images/Wonder-Building-Kit-step-case-22-38.png

../../_images/Wonder-Building-Kit-step-case-22-39.png

../../_images/Wonder-Building-Kit-step-case-22-40.png

../../_images/Wonder-Building-Kit-step-case-22-41.png

../../_images/Wonder-Building-Kit-step-case-22-42.png

../../_images/Wonder-Building-Kit-step-case-22-43.png

../../_images/Wonder-Building-Kit-step-case-22-44.png

../../_images/Wonder-Building-Kit-step-case-22-45.png

../../_images/Wonder-Building-Kit-step-case-22-46.png

24.5. Hardware Connection#

Connect a motor to M2 port on Wukong breakout board.

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

24.6. Software Platform#


MakeCode

24.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

Program#

../../_images/Wonder-Building-Kit-case-22-04.png

Link:https://makecode.microbit.org/_2zv14dduY6D7

Result#

When button A is pressed, the micro:bit displays a heart pattern and the helicopter propeller starts to rotate; when button B is pressed, the micro:bit screen is cleared and the helicopter propeller stops rotating.