12. Case 12: The Forklift#

12.1. Purpose#


To make a forklift.

../../_images/case-12-01.png

12.3. Materials Required#


../../_images/case-12-02.png

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

12.4. Bricks build-up#


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

12.5. Hardware Connection#

将两个电机连接到悟空扩展板的M1、M2接口,将舵机连接到悟空扩展板的S0接口.

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

12.6. Software Platform#


MakeCode

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

Search with https://github.com/elecfreaks/pxt-sonarbit in the dialogue box to add the sonar:bit extension.

../../_images/case-04-04.png

Program#

For Joystick:bit:

../../_images/case-12-05.png

Link:https://makecode.microbit.org/_f5DVqMKrtgYA For the forklift:

../../_images/case-12-06.png

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