Introduction: Arduino Joystick Servo Control Using 1Sheeld

Intro:
Have you ever wondered how does robot arm work? Or even wanted to make an automated door locker? Or watched a robot that sees all its surroundings with only one sensor, and wanted to make your own? Then you have to know that all these things use servo motors to enable the device to rotate a specific part of it (ex: robot arm) at a certain degree .. this is simply the magic of servo motor “the ease of controllability”.

So, we’ll give it a try here with taking servo control to a whole new level by using 1Sheeld to make Arduino Joystick Servo Control tutorial.

Idea:
The idea behind Arduino Joystick Servo Control is to control the servo wirelessly via 1Sheeld board that communicates with 1Sheeld Joystick shield App. We will use a 180-degree servo motor where we’re going to control only 3 positions: 0 degree (which is the direction to the most right). 90 degree (which is the direction to the most up). 180 degree (which is the direction to the most left).

Getting started:

If this is your first time to deal with 1Sheeld or you want to learn more about it, I recommend checking this quick and easy tutorial .

And if you haven't played with a servo motor before, I recommend checking this quick video . Now, after you've become a little bit familiar with 1Sheeld, let's start!

Step 1: Hardware Components

Prepare these components for the Arduino Joystick Servo Control project:

  1. Arduino Uno.
  2. 1Sheeld board.
  3. S90 servo motor.
  4. 3 * Male to male wires.
  5. Arduino USB cable or 9-12v battery.
  6. Android/iOS phone with 1Sheeld App installed on it.

Step 2: Software Components

Step 3: Connection and Schematic

  1. Firstly, Plug the 1Sheeld board into your Arduino as image1.
  2. Connect the servo motor 3 wires as image2.
  3. Switch the 1Sheeld power to operate on 5v (Not the 3.3v) as image3.

Note that 1Sheeld have 2 modes: Uploading mode and Operating mode. You can switch between them using the switch close to the Digital pins and is called “UART SWITCH” on 1Sheeld and “SERIAL SWITCH” on 1Sheeld+.

So, firstly, you slide the switch towards the “SWITCH” notation which turns the 1Sheeld board into the Uploading mode to let you upload the Arduino code, as image4.

Then, after you finish uploading the code, slide the switch towards the “UART” notation (or “SERIAL” at 1Sheeld+ board) as image5, which turns the 1Sheeld board into the Operating mode to communicate with your smartphone 1Sheeld App.

Step 4: Code

I would recommend checking the Arduino Joystick Shield documentation to know more about the Arduino Clock Shield functionality and how to use them.

Now, Switch the 1Sheeld board to the Uploading mode, upload the attached code to your Arduino.

Then, Switch the 1Sheeld board to the Operating mode then open the 1Sheeld app and connect it to the 1Sheeld board via Bluetooth.

Step 5: Run It

Switch the 1Sheeld board to the Operating mode then open the 1Sheeld app and connect it to the 1Sheeld board via Bluetooth.

Finally, select the Gamepad shield from the shields list.

Now you are ready to start playing with your servo at the 3 directions; right, up and left by using your smartphone .. have fun with it ^_^

Hope you enjoy this Arduino Joystick Servo Control project! .. Follow us for more tutorials using 1Sheeld.