> For the complete documentation index, see [llms.txt](https://sharinghub-eng.kittenbot.hk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sharinghub-eng.kittenbot.hk/educational-kit-sets/industry-4.0-robotic-arm/industry-4.0-robotic-arm-for-sye.md).

# Industry 4.0 Robotic Arm for SYE

### Set Contents

1. Robotic Arm x1
2. Robotbit 2.2 x1
3. 18650 Battery x1
4. Joyfrog Controller x1
5. Micro:bit board x4
6. AAA Battery Box x2
7. AAA Battery x4
8. 1m Mini USB Cable x1
9. Double sided tape x4

### Wiring Diagram

<figure><img src="/files/p0Zo7qo6T9L2dHdwdIqn" alt=""><figcaption></figcaption></figure>

### Set Up Procedure

Connect the Robot arm onto the base plate for stability.

<div><figure><img src="/files/rWdCVoP29th4KEU4S2s3" alt=""><figcaption></figcaption></figure> <figure><img src="/files/h3H34QYu65bpDPlpf0Wh" alt=""><figcaption></figcaption></figure></div>

Connect the servo wires according to the labels/wiring diagram.

<figure><img src="/files/qf7E0X8fWGVgCmvX9msr" alt=""><figcaption></figcaption></figure>

Mount the counterweight onto the back of the robot arm.

<div><figure><img src="/files/3ibhsg5KmmtOJyhksNHJ" alt=""><figcaption></figcaption></figure> <figure><img src="/files/0GXEsr8v7q2RkhAmyVop" alt=""><figcaption></figcaption></figure></div>

#### 1. Robot Arm Micro:bit

Insert the Micro:bit marked as "Robot Arm" into the Robotbit. Switch on the Robotbit.

<div><figure><img src="/files/1KjQoDR53cVp5jP3P62Z" alt=""><figcaption></figcaption></figure> <figure><img src="/files/tuoBSaFCKDSRUvX7Dwe5" alt=""><figcaption></figcaption></figure></div>

#### 2. Controller Micro:bit

Insert the Micro:bit marked as "Controller" into the Joyfrog Controller. Switch on the battery box.

Use the joystick to control the rotation and the main arm. Use the X and B buttons to control the secondary arm, while Y and A buttons will control the jaws.

<div><figure><img src="/files/QWa9JHxysvkJQc9G5wqi" alt=""><figcaption></figcaption></figure> <figure><img src="/files/rr7hSK3iqKIiay1ZfOIa" alt=""><figcaption></figcaption></figure></div>

#### 3. Motion Sensor Micro:bit

Mount the Micro:bit marked as "Sensor" onto the Robot Arm using the screws provided. Switch on the battery box.

<figure><img src="/files/MpYdarGFXfnWrbkzocXS" alt=""><figcaption></figcaption></figure>

#### 4. Serial Monitor Micro:bit

Connect the Micro:bit marked as "USB" to the computer with a USB cable, then open Microsoft MakeCode. Create a new project.

<figure><img src="/files/orw6lWspZNq6B88WywHw" alt=""><figcaption></figcaption></figure>

Click "Show Data (Device)".

<figure><img src="/files/OKcacjNTbJGacmrBxxps" alt=""><figcaption></figcaption></figure>

The serial monitor console from the Micro:bit will be shown.

<figure><img src="/files/CVVaJpHRic5bySjKwL6q" alt=""><figcaption></figcaption></figure>

To export the data as CSV format, click the Export Data button on the top right corner.

<div><figure><img src="/files/h9njhh43jYCcLtq2ifyh" alt=""><figcaption></figcaption></figure> <figure><img src="/files/RgdSf7lMWiTimkPEUtKy" alt=""><figcaption></figcaption></figure></div>

### Relocating the Sensor Micro:bit

The sensor Micro:bit can be relocated if needed.

{% hint style="info" %}
The Micro:bit has been removed for illustration purposes.
{% endhint %}

#### 1. Remove the securing pins

<div><figure><img src="/files/GtQ6moZ2QkFjsajjXJwq" alt=""><figcaption></figcaption></figure> <figure><img src="/files/06fF9vTiRudDvhuVoPb2" alt=""><figcaption></figcaption></figure></div>

#### 2. Install the sensor assembly at another location

<div><figure><img src="/files/mCcNXfGBzbFTQxfxu5hC" alt=""><figcaption></figcaption></figure> <figure><img src="/files/pC80eQhrUQQwj5nDXHzZ" alt=""><figcaption></figcaption></figure></div>

#### 3. Push the securing pins to secure the Sensor Micro:bit

<div><figure><img src="/files/yBV4fWHUdaoHz5zrllaV" alt=""><figcaption></figcaption></figure> <figure><img src="/files/V84nr08DukLPF7P2pt52" alt=""><figcaption></figcaption></figure></div>

### Sample Programs

By default, all Micro:bit should already be running the necessary programs. If required, please use the following sample programs.

#### For Robot Arm

{% embed url="<https://makecode.microbit.org/_4rLaEuaoLUcj>" %}

#### For Joyfrog Controller

{% embed url="<https://makecode.microbit.org/_ToAd22ehhUpo>" %}

#### For Motion Sensor

{% embed url="<https://makecode.microbit.org/_e88VJ5UixLee>" %}

#### For Serial Monitor

{% embed url="<https://makecode.microbit.org/_XHrTfJaodLd5>" %}

### Micro:bit Program Recovery

Follow the instructions to recover and reupload the programs onto the Micro:bit.

### Recovery Method 1:

#### 1. Connect the Micro:bit to a computer using a USB cable.

<figure><img src="/files/k5mOH674LdapQ7DEOsWX" alt=""><figcaption></figcaption></figure>

#### 2. Open the sample program on MakeCode.

#### 3. Press the download button.

<figure><img src="/files/6AIKmWU2cFQpZSaVPazw" alt=""><figcaption></figcaption></figure>

#### 4. Follow the instructions.

<div><figure><img src="/files/gEdace1f1jWi0bxY0Ps8" alt=""><figcaption></figcaption></figure> <figure><img src="/files/YMubgAEIoFuk5Zfk5mu5" alt=""><figcaption></figcaption></figure></div>

<div><figure><img src="/files/dYqXgD2CRtfspDEcR7SB" alt=""><figcaption></figcaption></figure> <figure><img src="/files/oGYbBrlK7qKzg3hEPskx" alt=""><figcaption></figcaption></figure></div>

### Recovery Method 2:

#### 1. Connect the Micro:bit to a computer using a USB cable.

<figure><img src="/files/k5mOH674LdapQ7DEOsWX" alt=""><figcaption></figcaption></figure>

#### 2. Open the sample program on MakeCode.

#### 3. Click Download the program as File.

<figure><img src="/files/JgyyxRI3HZElXp0p09jQ" alt=""><figcaption></figcaption></figure>

#### 4. Save the file onto the Micro:bit drive.

<figure><img src="/files/IMj1lBGemowSJThYP40u" alt=""><figcaption></figcaption></figure>

### Micro:bit Radio Channels Designation

In order for the Micro:bits to work as intended, they need to be set to the correct channels.

The Radio channels can be set in this programming block.

<figure><img src="/files/NMJwv1gmrG415lsNGoP4" alt="" width="267"><figcaption></figcaption></figure>

#### The Micro:bits for Controller and Robot Arm need to be set to the same channels.

<div><figure><img src="/files/yL0UP6tGPbLVaLCmc868" alt=""><figcaption></figcaption></figure> <figure><img src="/files/5hyIPlnTppMi9t42z4gJ" alt=""><figcaption></figcaption></figure></div>

#### The Micro:bits for Serial Monitor and Motion Sensor need to be set to the same channels.

<div><figure><img src="/files/qAzXNxEAww5AZMFQxSu4" alt="" width="406"><figcaption></figcaption></figure> <figure><img src="/files/8PZf1OC7wlaTdP4XiwXv" alt="" width="400"><figcaption></figcaption></figure></div>

### Troubleshooting

#### Q: The Robot Arm is unstable and shaking when moving.

#### A: The battery has run out, charge the battery with a USB cable.

#### Q: The Robot Arm cannot grab onto objects.

#### A: Try using a soft object to increase grip, or try lighter objects.
