# Case 08: The Robot Arm ## Purpose --- To make a robot arm. ![](./images/case-08-01.png) ## Link --- [micro:bit Wonder Building Kit](https://shop.elecfreaks.com/products/elecfreaks-micro-bit-32-in-1-wonder-building-kit-without-micro-bit-board?_pos=5&_sid=2094afd2f&_ss=r) [Joystick bit](https://shop.elecfreaks.com/products/elecfreaks-micro-bit-joystick-bit-v2-kit?_pos=2&_sid=ace7fad9a&_ss=r) ## Materials Required --- ![](./images/case-08-02.png) Video link: [https://youtu.be/IRJKXAfJf9M](https://youtu.be/IRJKXAfJf9M) ## 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) ## Hardware Connection Connect two [motors](https://www.elecfreaks.com/geekservo-motor-2kg-compatible-with-lego.html) to M1 and M2, the [servo](https://www.elecfreaks.com/geekservo-2kg-360-degrees-compatible-with-lego.html) to S0 ports on [Wukong breakout board](https://www.elecfreaks.com/wukong-board-with-lego-holder-for-micro-bit.html). ![](./images/Wonder-Building-Kit-case-08-06.png) ## Software Platform --- [MakeCode](https://makecode.microbit.org/) ## 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](https://makecode.microbit.org/_3mK9cbULkLCy) For the robot arm: ![](./images/case-08-06.png) Link:[https://makecode.microbit.org/_92hgiPE9Kdec](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.