17. Case 15: The Walking Robot#

17.1. Purpose#


To make a walking robot.

../../_images/case-15-01.png

17.3. Materials Required#


../../_images/case-15-02.png

Video link: https://youtu.be/ohn8NMhKybw

17.4. Bricks build-up#


../../_images/step-case-15-01.png

../../_images/step-case-15-02.png

../../_images/step-case-15-03.png

../../_images/step-case-15-04.png

../../_images/step-case-15-05.png

../../_images/step-case-15-06.png

../../_images/step-case-15-07.png

../../_images/step-case-15-08.png

../../_images/step-case-15-09.png

../../_images/step-case-15-10.png

../../_images/step-case-15-11.png

../../_images/step-case-15-12.png

../../_images/step-case-15-13.png

../../_images/step-case-15-14.png

../../_images/step-case-15-15.png

../../_images/step-case-15-16.png

../../_images/step-case-15-17.png

../../_images/step-case-15-18.png

../../_images/step-case-15-19.png

../../_images/step-case-15-20.png

../../_images/step-case-15-21.png

../../_images/step-case-15-22.png

../../_images/step-case-15-23.png

../../_images/step-case-15-24.png

../../_images/step-case-15-25.png

../../_images/step-case-15-26.png

../../_images/step-case-15-27.png

../../_images/step-case-15-28.png

../../_images/step-case-15-29.png

17.5. Hardware Connection#

Connect a motor to M1 port on Wukong breakout board.

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

17.6. Software Platform#


MakeCode

17.7. 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-06-05.png

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

Result#

The robot moves forward when button A is pressed, it moves backward when button B is pressed, and it stops moving when button A+B is pressed.