42. Case 41:The Forklift#

42.1. Introduction#

Build a forklift with the Nezha Inventor’s Kit.

../../_images/41_1.png

42.2. Quick to Start#

Materials Required#

Nezha Inventor’s Kit

Assembly#

Components List

../../_images/neza-inventor-s-kit-case-41-02.png

Build it as the pictures suggest:

../../_images/neza-inventor-s-kit-step-41-01.png

../../_images/neza-inventor-s-kit-step-41-02.png

../../_images/neza-inventor-s-kit-step-41-03.png

../../_images/neza-inventor-s-kit-step-41-04.png

../../_images/neza-inventor-s-kit-step-41-05.png

../../_images/neza-inventor-s-kit-step-41-06.png

../../_images/neza-inventor-s-kit-step-41-07.png

../../_images/neza-inventor-s-kit-step-41-08.png

../../_images/neza-inventor-s-kit-step-41-09.png

../../_images/neza-inventor-s-kit-step-41-10.png

../../_images/neza-inventor-s-kit-step-41-11.png

../../_images/neza-inventor-s-kit-step-41-12.png

../../_images/neza-inventor-s-kit-step-41-13.png

../../_images/neza-inventor-s-kit-step-41-14.png

../../_images/neza-inventor-s-kit-step-41-15.png

../../_images/neza-inventor-s-kit-step-41-16.png

../../_images/neza-inventor-s-kit-step-41-17.png

../../_images/neza-inventor-s-kit-step-41-18.png

../../_images/neza-inventor-s-kit-step-41-19.png

../../_images/neza-inventor-s-kit-step-41-20.png

../../_images/neza-inventor-s-kit-step-41-21.png

../../_images/neza-inventor-s-kit-step-41-22.png

../../_images/neza-inventor-s-kit-step-41-23.png

../../_images/neza-inventor-s-kit-step-41-24.png

../../_images/neza-inventor-s-kit-step-41-25.png

../../_images/neza-inventor-s-kit-step-41-26.png

../../_images/neza-inventor-s-kit-step-41-27.png

../../_images/neza-inventor-s-kit-step-41-28.png

../../_images/neza-inventor-s-kit-step-41-29.png

../../_images/neza-inventor-s-kit-step-41-30.png

../../_images/neza-inventor-s-kit-step-41-31.png

../../_images/neza-inventor-s-kit-step-41-32.png

../../_images/neza-inventor-s-kit-step-41-33.png

../../_images/neza-inventor-s-kit-step-41-34.png

../../_images/neza-inventor-s-kit-step-41-35.png

../../_images/neza-inventor-s-kit-step-41-36.png

../../_images/neza-inventor-s-kit-step-41-37.png

../../_images/neza-inventor-s-kit-step-41-38.png

../../_images/neza-inventor-s-kit-step-41-39.png

../../_images/neza-inventor-s-kit-step-41-40.png

../../_images/neza-inventor-s-kit-step-41-41.png

../../_images/neza-inventor-s-kit-step-41-42.png

../../_images/neza-inventor-s-kit-step-41-43.png

../../_images/neza-inventor-s-kit-step-41-44.png

../../_images/neza-inventor-s-kit-step-41-45.png

../../_images/neza-inventor-s-kit-step-41-46.png

../../_images/neza-inventor-s-kit-step-41-47.png

../../_images/neza-inventor-s-kit-step-41-48.png

../../_images/neza-inventor-s-kit-step-41-49.png

../../_images/neza-inventor-s-kit-step-41-50.png

../../_images/neza-inventor-s-kit-step-41-51.png

../../_images/neza-inventor-s-kit-step-41-52.png

../../_images/neza-inventor-s-kit-step-41-53.png

We can see that the construction is completed as shown in the following figure:

../../_images/neza-inventor-s-kit-case-41-01.png

Connection Diagram#

Connect two motors to M1 and M4 on Nezha Breakout Board.

../../_images/neza-inventor-s-kit-case-41-03.png

42.3. MakeCode Programming#

Step 1#

Click “Advanced” in the MakeCode drawer to see more choices.

../../_images/neza-inventor-s-kit-case-37-04.png

For programming Nezha Breakout Board, we need to add a package. Search with “Nezha” in the dialogue box and click to download it.

../../_images/neza-inventor-s-kit-case-37-06.png

Notice: If you met a tip indicating that some codebases would be deleted due to incompatibility, you may continue as the tips say or create a new project in the menu.

Step 2#

Code as the picture suggests#

../../_images/neza-inventor-s-kit-case-41-07.png

Reference#

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

You may also download it directly:

---

Result#

Press button A, the forklift drives forward for 2 seconds, and lifts the fork, then continues driving forward for 2 seconds, then puts down the fork, finally reverses a certain distance and stops.

../../_images/41_41.gif