# Case 12: The Forklift ## Purpose --- To make a forklift. ![](./images/case-12-01.png) ## Link --- [micro:bit Wonder Building Kit](https://shop.elecfreaks.com/products/elecfreaks-micro-bit-32-in-1-wonder-building-kit-without-micro-bit-board?_pos=5&_sid=2094afd2f&_ss=r) [Joystick bit](https://shop.elecfreaks.com/products/elecfreaks-micro-bit-joystick-bit-v2-kit?_pos=2&_sid=ace7fad9a&_ss=r) ## Materials Required --- ![](./images/case-12-02.png) Video link: [https://youtu.be/PIhMVJYBMhM](https://youtu.be/PIhMVJYBMhM) ## 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) ## Hardware Connection Connect two [motors](https://www.elecfreaks.com/geekservo-motor-2kg-compatible-with-lego.html) to M1 and M2, the [servo](https://www.elecfreaks.com/geekservo-2kg-360-degrees-compatible-with-lego.html) to S0 ports on [Wukong breakout board](https://www.elecfreaks.com/wukong-board-with-lego-holder-for-micro-bit.html). ![](./images/Wonder-Building-Kit-case-12-06.png) ## Software Platform --- [MakeCode](https://makecode.microbit.org/) ## 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](https://makecode.microbit.org/_f5DVqMKrtgYA) For the forklift: ![](./images/case-12-06.png) Link:[https://makecode.microbit.org/_UoAP69ArTfyT](https://makecode.microbit.org/_UoAP69ArTfyT) ### Result Use the handle to control the forklift, the up and down, left and right directions of the handle rocker are to control the forward and backward, the left and right movement of the forklift, D button to control the raisin of the forklift, C button to control the lowering of it.