46. Case 42:The Grabbing Cart#

46.1. Introduction#

Build a grabbing cart with the Nezha Inventor’s Kit.

../../_images/42_1.png

46.2. Quick to Start#

Materials Required#

Nezha Inventor’s Kit

Assembly#

Components List

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

Build it as the assembly steps suggest:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Connection Diagram#


Connect the geekservo to S1 and the two motors to M1 and M2 on Nezha Breakout Board.

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

46.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-42_07.png

Reference#

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

You may also download it directly:

Result#

First manually adjust the opening angle of the mechanical claw, then turn on the power, press the button A, the car will travel forward for a certain distance and grab the object.

Thinking#

Is it possible to make a car that can turn directions and grab objects with this kit?

../../_images/42_42.gif