19. Case 19: The Crawler#

19.1. Purpose#


To make a crawler.

../../_images/case-19-01.png

19.3. Materials Required#


../../_images/case-19-02.png

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

19.4. Bricks build-up#


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

19.5. Hardware Connection#

Connect a motor to M1 port on Wukong breakout board.

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

19.6. Software Platform#


MakeCode

19.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-11-03.png

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

Result#

The crawler moves forward when button A is pressed, and stops moving when button B is pressed.