20. Case 18: The Aerial Ladder Truck#

20.1. Purpose#


To make an aerial ladder truck.

../../_images/case-18-01.png

20.3. Materials Required#


../../_images/case-18-02.png

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

20.4. Bricks build-up#


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

20.5. Hardware Connection#

Connect two motors to M1 and M2, the servo to S0 ports on Wukong breakout board.

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

20.6. Software Platform#


MakeCode

20.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 joystickbit in the dialogue box to download it.

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

Program#

For Joystick:bit:

../../_images/case-18-05.png

Link:https://makecode.microbit.org/_f5DVqMKrtgYA For the aerial ladder truck:

../../_images/case-18-06.png

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

Result#

Use the handle to control the ladder truck, the up and down, left and right directions of the rocker are to control the forward and backward, the left and right movement of the ladder truck, the C and D buttons are to control the lift of the ladder truck.