Introduction: Controlling a Robotic Arm Using Arduino , 1Sheeld and an Android Smart Phone

About: Communication and Electronics engineering Student Facebook : Twitter : 3adawy8

In this article we will show you how to use 1Sheeld and your Android smart phone sensors ( Orientation & Proximity sensors ) to control a Robotic arm wirelessly.

Brief about 1Sheeld :

Step 1: Our Tools

1- Robotic arm (form your own design or a pre-manufactured one) including any number of servo motors ( in our case we have 3 servo motors).

2- Arduino board compatible with the 1Sheeld ( UNO , MEGA , Due )

3- 1Sheeld

4- Android smart phone with 1Sheeld App. installed
App link on play store :

5- An external power supply for your servo motors ( we'd used a 12V supply here)

6- Test board

7- some jumbers

Step 2: Getting Started With 1sheeld

Then you must check this link before going far in the this article * :

* make sure to download the 1Sheeld library and adding it to your Arduino IDE.

Step 3: Start With Wiring

Connecting your servo motors to the digital pins in your Arduino and make sure to connect your power supply too , then collect your jumbers on the Testboard to connect them easlly to your supply and Arduino

Step 4: Coding

First we need to know the position (degree) for each servo in order to initialize the position for all of them , we can have this done by using the knob example ( at IDE go to File > Examples > Servo > Knob ).

Second starting to import the the libraries you will use from the 1Sheeld library at your IDE , for our case we need orientation sensor and proximity sensor library and don't forget to import the servo library.

but before starting with your code make sure that you have checked and tried those two sensors individually in your phone , also make sure that you totally know the functions that you will use from each library.

After that you have to get the reference values for your orientation sensor in the 3-axis (X ,Y, Z)
Z-axis : Tipping your phone horizontally to the up-side and down-side ( for getting the arm goes up and down)
X-axis : Rotating your phone about Z ( for getting the arm rotates to right and left )
Y-axis : Flipping the phone to back and front ( for getting the arm extends and recedes)
then put the values you will get into your code and start fitting it with your servo postion

Finally use the proximity sensor to open the close your arm's gripper (don't forget about getting sensor reads individually and insert them with your code).

*NOTE : Make sure to first that the UART switch in your 1Sheeld is on uploading mode before uploading your code.

Step 5: Getting Ready

Set the UART switch to connecting mode in order to connect your phone with the 1Sheeld (following the steps in 1Sheeld Getting start tutorial ).

Lanuch your shields ( proximity & orientation ).

Enjoy the game ;)

Step 6: Take a Look on This Video ;)