RobotGeek Snapper Arm V1 Getting Started Guide

This guide will teach you how to setup and use your RobotGeek Snapper Robot Arm V1 with 9g Servo.

If you are looking for the latest version of the Snapper, v3, please go to This Page.


  1. Setting up the Arduino Software
  2. Centering your Servos
  3. Snapper Arm Assembly
  4. Wiring the Snapper Arm
  5. Testing the Arm
  6. Controlling the Arm
  7. Demos and Projects
Helga Lovekaty

1. Setting up the Arduino Software

Geekduino Getting Started Guide

If you have not already set up your Geekduino/ Arduino compatible board, please see the Geekduino Getting Started Guide. This guide will assist you in getting set up with the Arduino software as well as install libraries and test sketches for the Snapper Arm. Even if you do not have a Geekduino, you should follow through this guide to grab the test sketches you will be using throughout the snapper arm getting started guide.

2. Aligning Your Servos


Servo motors act like robotic joints - you can set them to specific positions to move your robot to different positions. This means that the servo needs to be set to s specific position before assembling your robot, or it will not work correctly. We are going to 'center' the servos, setting them to halfway between their maximum and minimum position. To begin centering your servos, we're going to have to set up your test rig. This is incredibly easy to do with a RobotGeek Sensor Shield. Start by attaching your Sensor Shield to your Geekduino/Arduino Compatible board. Slot the bottom pins of the RobotGeek Sensor Shield into the terminals in the top of the Geekduino. Note how the boards seat evenly on top of each other, and the pins line up exactly. Be careful not to bend the pins.

Device Sensor Shield Port
Base Rotation RobotGeek Servo Digital 3
Shoulder RobotGeek Servo Digital 5
Elbow RobotGeek Servo Digital 6
Wrist RobotGeek Servo Digital 9
Gripper Blue 9g Servo Digital 11
Jumpers and Power

RobotGeek servos must be powered by an external power supply like the 7v5A power supply included with your kit. If you have servos plugged in to the shield and do not have the external power supply plugged into your Geekduino you will see erratic behavior.

You will also need to adjust your shield to make sure the power is getting to the servos correctly. Make sure that you have both of the jumpers on the Sensor Shield set to Voltage In (VIN) If you would like more information about this, check out the Jumpers/Power section of the RobotGeek 101 learning series.


The following code will set any servos on pins 3,5,6,9, to a centered position (90°). It will set any servo attached to pin 11 to 150° - this is intended for a 9g servo using the original RobotGeek 9G gripper. RobotGeek servos should NOT be plugged into pin 11 at this time.

This code will both test and center your servos. Each servo will move do 45 degrees, 125 degrees, then 90 degrees. If you want to restart the movement, just push the reset button on your Geekduino. Make sure to only run this code when nothing is attached to your servos. Running this code on an assembled robot could damage the robot or servos.

File -> Sketchbook -> RobotGeek Sketches -> Tools -> gripperAndArmServos

If you cannot find this sketch, make sure you have setup your Libraries in the Geekduino Getting Started Guide. You can load this code using the same method as you used to load your test code on the Geekduino Getting Started Guise.

Installing Servo Horns

Once the RobotGeek Servos have stopped moving, they are centered and you can install the servo horn. To line up the horn, place it with the notch facing up. If it does not slide on easily, or it clicks into place with the holes not facing cardinal directions, ignore the notch, remove the horn, rotate it about 45 degrees and try again. Repeat until the top and bottom holes are aligned exactly North and South of the center, as shown.

Warning: Do not rotate the center shaft during this process. This was aligned when you ran the gripperAndArmServos tool in the above step.

b_500_500_16777215_00__images_tutorials_rgServo_center3.jpg b_500_500_16777215_00__images_tutorials_rgServo_center4.jpg b_500_500_16777215_00__images_tutorials_rgServo_center5.jpg

Three of your RobotGeek servos will also need idler horns. Idler horns are passive horns on the opposite side of the main servo horn. The idler horn allows you to connect a hinge bracket to the servo. The remaining two of your servos will not need idler horns.

Install the idler horn on the back of the servo and secure it with the silver screw. Orientation on the idler horn does not matter.

b_500_500_16777215_00__images_tutorials_rgServo_idle1.jpg b_500_500_16777215_00__images_tutorials_rgServo_idle2.jpg b_500_500_16777215_00__images_tutorials_rgServo_idle3.jpg

No horn will be installed on the 9G servo at this time if you are building the original snapper.

If you'd like more information on centering servos, see this page for more information and a video on centering servos.

3. Snapper Arm Assembly

Snapper Arm Assembly Guide

At this point, follow through the Snapper Arm Assembly Guide. Once you have completed the assembly, return here to wire, test, and run your robotic arm.

4. Wiring the Snapper Arm

Whether you are building the complete snapper arm or working off the core kit, you will need to connect all of your servos as noted here for testing and operation.

During the assembly of the Snapper Arm, you should have wired up your servos to the sensor shield. Please take a moment to double check your connections and jumper match the following diagrams.

Device Sensor Shield Port
Base Rotation RobotGeek Servo Digital 3
Shoulder RobotGeek Servo Digital 5
Elbow RobotGeek Servo Digital 6
Wrist RobotGeek Servo Digital 9
Gripper blue 9g Servo Digital 10

It is not necessary to attach your controls to the arm for testing, but you can do that now if you have the complete kit and you are going to use the controls later.

Device Sensor Shield Port
Analog Sensors
Joystick (Horizontal) Analog 0
Joystick (Vertical) Analog 1
Joystick (Vertical) Analog 2
Joystick (Vertical) Analog 3
Rotation Knob Analog 4
Digital Sensors
Capture Pushbutton Digital 2
Playback Pushbutton Digital 4
Wiring for Snapper Arm with Inputs

5. Testing the Arm

When you installed the RobotGeek Tools and Libraries, you installed the test sketch for the snapper arm. You can find the snapperArmTest here:

File -> Sketchbook -> RobotGeek sketches -> Tests -> snapperArmTest

Before you can load the code onto your Robot Arm, you'll need to adjust your code to match your gripper type. Around line 67 you should see the following code block


If you have any problems finding these lines, just press the 'compile' button and you'll see an error just below the code block.

In the code block, the two lines are Commented Out. Any line that starts with // is not processed by the Arduino IDE. This is useful for making code comments or to de-activate code without deleting the line. You will need to Uncomment one line by removing the slashes as shown below.

If you are using the RobotGeek 9G Gripper, uncomment the first line. Your code should look like


Now that the gripper type is defined, the code will take care of correctly processing your gripper type. Now load the sketch onto your Geekduino. The Arm should complete the following movements:

  • Arm Moves to 'centered' position
  • Base Servo
    • Base servo moves 90 degrees clockwise (right)
    • Base servo moves 180 degrees counterclockwise (left)
    • Base servo moves 90 degrees clockwise to 'centered' position (right)
  • Shoulder Servo
    • Shoulder servo moves 90 degrees clockwise (back)
    • Shoulder servo moves ~120 degrees counterclockwise (forward)
    • Shoulder servo moves ~30 degrees clockwise (back) to 'centered' position
  • Elbow Servo
    • Elbow servo moves ~30 degrees clockwise (down)
    • Elbow servo moves ~120 degrees counterclockwise (up)
    • Elbow servo moves 90 degrees clockwise (down)to 'centered' position
  • Wrist Servo
    • Wrist servo moves 90 degrees clockwise (down)
    • Wrist servo moves 180 degrees counterclockwise (down)
    • Wrist servo moves 90 degrees clockwise (down)to 'centered' position
  • Gripper Servo
    • Gripper servo closes
    • Gripper servo opens
    • Gripper servo moves to 'centered' position

The arm will stay at its centered position until the board is reset (when the sequence will repeat). Now you can load control software onto the arm.

6. Controlling the Arm

RobotGeek Snapper Arm Control Sketch

All of the snapper demo code can be downloaded here. Once you unzip the file, rename the SnapperArm-master folder to Snapper Arm. Put the Snapper Arm folder in your RobotGeek sketches folder.

Documents -> Arduino -> RobotGeek sketches	

Now start/restart your Arduino IDE. Once the IDE is open, you can open the Analog Arm Control demo.

File -> Sketchbook -> RobotGeek sketches -> Snapper Arm -> Basic Examples -> RobotGeekArmAnalog	

Just like in the arm test code, you will need to make sure that you have the correct GRIPPER_TYPE line uncommented in your code.


The three joysticks will incrementally move the base, shoulder, elbow and wrist joint. Moving the joystick up will slowly move the joint in one direction, while moving the joystick down will move it in the opposite direction. See the diagram below to see which axis will control which servo.

The rotational knob will control the position of the gripper. Rotating the second knob counter-clockwise will open the gripper all the way, and rotating the knob clockwise will close the gripper all the way.


These servos have no over-current protection. The code will limit the servos positions in an attempt to limit collisions, but it is still possible to create collisions with the arm. Trying to lift to large of a load or applying to much force to the gripper (especially the 9G gripper) may damage the servos. Pay mind to the positional limits when implementing your own custom code.

Analog Input Mapping

This code uses a combination of direct and incremental code for converting analog inputs into servo positions

  • Direct/Absolute Mapping

    Absolute positioning is used for the knobs controlling the base and gripper servo. This means that the value of the knob is mapped directly to the corresponding servo value. This method is ideal for sensors that stay at static positions such as knobs and sliders.

  • Incremental Mapping

    Incremental code is used for the joysticks controlling the shoulder, elbow and gripper servo. Each joystick value is mapped to a small relatively small positive or negative value. This value is then added to the present position of the servo. The action of slowly moving the joystick away from its center position can slowly move each joint of the robot. When the joystick is centered, no movement is made

    The choice for using Direct/Incremental mapping for each joint was made based on usability, however the code can be modified so that any joint can use either direct or incremental mapping

Servo Positions

The servos' positions will be tracked in microseconds, and written to the servos using .writeMicroseconds().

For RobotGeek servos, 600µs(0°) corresponds to fully counter-clockwise while 2400µs(180°) corresponds to fully clock-wise. 1500µs(90°) represents the servo being centered . The gripper servo should not be set below 750µs.

For the 9g servo, 900µs(0°) corresponds to fully counter-clockwise while 2100µs(180°) corresponds to fully clock-wise. 1500µs(90°) represents the servo being centered

Demo And Project Code

RobotGeek 101

Are you ready to dive even deeper into the world of Arduino? Then take a look at Robotgeek 101! RobotGeek 101 is a step by step guide that will teach you how to build, wire, and program your Geekduino/Arduino. Through RobotGeek 101 you will learn the basics of Arduino like digital input and output, and move on to more advanced topics like PWM and servo control. By the end of RobotGeek 101 you'll be well equipped to start modifying our demo code and creating your own custom applications.

RobotGeek 101

Getting Started