23. Case 21: The Spider Walker#

23.1. Purpose#


Make a spider walker.

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

23.3. Materials Required#


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

23.4. Bricks build-up#


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

23.5. Hardware Connection#

Connect a motor to M1 port on Wukong breakout board.

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

23.6. Software Platform#


MakeCode

23.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-21-04.png

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

Result#

The spider 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.