Skip to main content

Case 45:The Grasping Car V2

Introduction

In the previous case we built a grabbing car which can grasp objects very well, but it is not able to turn. We use Nezha Inventor's Kit to build a car that can both turn and grab objects here, the obvious feature in this case is that only one servo is applied to realize both the functions of lifting, lowering and grasping objects by the mechanical claw.

Quick to Start

Materials Required

Nezha Inventor's Kit

Assembly

Components List

Build it as the assembly steps suggest:

Connection Diagram

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

MakeCode Programming

Step 1

Click "Advanced" in the MakeCode drawer to see more choices.

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

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

Reference

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

You may also download it directly:

Result

After powering on the device, the arm will be put on the floor. Flap your hands or make some noise near the micro:bit, the robot will move forward. While pressing button C on the PlanetX button module, the robot car stops moving and the robot arm starts grasping the goods and lifting them up. Touching the micro:bit logo to reverse the robot car and press button D to put the goods down.