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.
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).
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 getting started 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!
- Plug the 1Sheeld board into your Arduino as this:
- Connect the servo motor 3 wires as illustrated below:
- Switch the 1Sheeld power to operate on 5v (Not the 3.3v):
- 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+.
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.
Secondly, after you finish uploading the code, slide the switch towards the “UART” notation (or “SERIAL” at 1Sheeld+ board) which turns the 1Sheeld board into the Operating mode to communicate with your smartphone 1Sheeld App.
- Connect the Arduino via your PC using Arduino USB cable.
Switch the 1Sheeld board to the Uploading mode, upload the attached code.
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.