Case 6 - Control of Robotic Clamp Claw
Part 1 Objective
After you compile the program, you can open and close the robotic clamp claw as you like.
Part 2 Preparation
MegaPi x 1
MegaPi encoder/DC motor driver x 1
Plastic robotic clamp claw x 1
Robotic clamp claw cable x 1
USB cable (Type-B) x 1
Battery holder with 6 AA batteries x 1
Computer with network access x 1
Install the MegaPi encoder/DC motor driver on MegaPi (the driver is connected to port 4A/4B in this program), connect the plastic robotic clamp claw to any port for DC motor driver on MegaPi (select the port you connect to when you program, and the port selected here is 4B) by using the robotic clamp claw cable, connect the battery holder to MegaPi, connect MegaPi to the computer by using the USB cable, open mBlock 5 (PC client, web version, or mobile app), click +add, select Ultimate 2.0 from Device Library, click Connect, and select the Live mode.
Update the firmware of Ultimate.
Part 3 Programming
Control of robotic clamp claw: Use the wait 1 seconds block from the Control blocks to control the opening and closing of the robotic clamp claw, making the robotic clamp claw open for 1 second and then close for 1 second, and repeat this process.
Part 4 Practice
Try to change the interval between opening and closing of the robotic clamp claw, and see what the difference is.