Main Content

Controlling a robot with joysticks or a mobile application is a common practice. However, I like to challenge my students by exploring alternative ways to control robot arm movements, such as using simple hand gestures. In the provided video, it can be seen that waving a hand to the left or right will cause the robot arm to rotate counterclockwise or clockwise, respectively.


- MeArm V1.0 kit (acrylic parts)
- Servo motors MG90S x4
- 10cm Servo Male-Female Extension Wire
- micro:bit x2
- IO:bit V2.1 expansion board or any similar board that provides SVG connector with 5V supply for 4 servos
- AA 1.5Vx2 battery pack or power bank with micro USB cable

Controlling real robots can be a complex task, but I would like to encourage my students to program and control the MeArm robot arm using micro:bit. By connecting 4 servo motors to micro:bit pins, I can use the “servo write” block command to move a servo to any desired angle.

First, decide which pins will be used to control the servo motors.

Servo under the base - connect to P13
Servo on the left side - connect to P14
Servo on the right side - connect to P8
Servo at the grip - connect to P12
To enhance the mobility of the robot arm, I plan to utilize radio communication between two micro:bits. This will enable me to control the robot arm wirelessly. For the communication to work, both micro:bits must be configured to the same radio group. The radio group can be assigned any value between 0 to 255. In this project, the radio group is set to 1.

To make controlling the robot arm more interesting, I came up with an idea to use a simple gesture. For example,

Tilt micro:bit to the left - the robot arm rotates counterclockwise.
Tilt micro:bit to the right - the robot arm rotates clockwise.
Tilt micro:bit to the front - the robot arm moves forward.
Tilt micro:bit to the back - the robot arm moves backward.
while pressing button B and
Tilt micro:bit to the back - the grip moves up
Tilt micro:bit to the front - the grip moves down
To open or close the grip, just press button A.
The micro:bit uses an on-board accelerometer sensor to detect changes in its orientation, specifically the roll and pitch angles. With this feature, students can create programs that detect the direction in which the micro:bit board has been tilted. They can then use these programs to send commands to another micro:bit, to control the movement of a servo motor according to the user’s gesture.

The format of those commands is simple. for example, sending “Base” and the number of degrees the servo rotates - will cause the servo motor located at the base to rotate from its current angle, while plus and minus numbers determine the direction of rotation.

Here are 5 basic commands for controlling the robotic arm:

To rotate the base of the arm, use the command “Base +/- nnn” where “nnn” indicates the number of degrees you want to move the servo. A positive value will rotate it clockwise, while a negative value will rotate it counterclockwise.
If you want to move the arm forward or backward, use the command “Stretch +/- nnn”. This will rotate the servo on the right side of the arm.
To move the grip up or down, use the command “Level +/- nnn”. This will rotate the servo on the left side of the arm.
Finally, to toggle the state of the grip between open and closed, simply use the command “Grip 0”.”

Link to article