10. Case 08: The Robot Arm#

10.1. Purpose#


To make a robot arm.

../../_images/case-08-01.png

10.3. Materials Required#


../../_images/case-08-02.png

Video link: https://youtu.be/IRJKXAfJf9M

10.4. Bricks build-up#


../../_images/step-case-08-01.png

../../_images/step-case-08-02.png

../../_images/step-case-08-03.png

../../_images/step-case-08-04.png

../../_images/step-case-08-05.png

../../_images/step-case-08-06.png

../../_images/step-case-08-07.png

../../_images/step-case-08-08.png

../../_images/step-case-08-09.png

../../_images/step-case-08-10.png

../../_images/step-case-08-11.png

../../_images/step-case-08-12.png

../../_images/step-case-08-13.png

../../_images/step-case-08-14.png

../../_images/step-case-08-15.png

../../_images/step-case-08-16.png

../../_images/step-case-08-17.png

../../_images/step-case-08-18.png

../../_images/step-case-08-19.png

../../_images/step-case-08-20.png

../../_images/step-case-08-21.png

../../_images/step-case-08-22.png

../../_images/step-case-08-23.png

../../_images/step-case-08-24.png

../../_images/step-case-08-25.png

../../_images/step-case-08-26.png

../../_images/step-case-08-27.png

../../_images/step-case-08-28.png

../../_images/step-case-08-29.png

../../_images/step-case-08-30.png

../../_images/step-case-08-31.png

../../_images/step-case-08-32.png

../../_images/step-case-08-33.png

../../_images/step-case-08-34.png

10.5. Hardware Connection#

Connect two motors to M1 and M2, the servo to S0 ports on Wukong breakout board.

../../_images/Wonder-Building-Kit-case-08-06.png

10.6. Software Platform#


MakeCode

10.7. 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 joystickbit in the dialogue box to download it.

../../_images/case-08-04.png

Program#

For Joystick:bit:

../../_images/case-08-05.png

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

For the robot arm:

../../_images/case-08-06.png

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

Result#

Control the robot arm with the Joystick:bit, the left and right direction of the handle rocker controls the rotation of the robot arm to the left and right, the up and down direction of the handle rocker controls the rise and fall of the robot arm, the C button controls the clamping of the robot arm, and the D button controls the release of the robot arm clamp.