Joystick Controlled Camera




Introduction: Joystick Controlled Camera

About: Love to make things / soldering / Arduino / Electronics / Nitro RC! / The Netherlands! / Love Music

First of all, my English is not perfect =)

I've seen many projects with Arduino that describes how to control 2 servo's with a joystick or use a lcd screen. All of the projects that i have seen are all seperate things. So i decided to make a short Instructable of these things combined. In this instructable is everything you need! Drawings, schematics, pictures and even the Complete Code that i've mostly written! This project is made on a breadboard because i just didn't have the time to make this in a nice shining aluminum box  :O

In the picture above you see the camera mounted in two aluminum brackets for the servo's. I have a instructable for that too!!!
Check it out!



Enjoy! =)

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Parts

Here is a list of all the parts you need.
  • Arduino uno / Mega
  • Breadboard
  • jumper wires
  • Joystick
  • 20*4 LCD Display
  • 2 servo's
  • 10Kohm potentiometer
  • NPN transistor (BC547B)
  • 6 volt battery or power supply

Step 2: Wiring

Hook up all the wires according to the picture.
I've made this circuit in Fritzing. It is very easy to use and even has multiple Arduino's in it. Basic components are all there.

(I wanted to upload my own frtizing file but i could'nt succeed :( )
You can download Fritzing here:

Step 3: Code

Upload the code to the arduino and if everything is connected right the lcd screen will light up!


#include <Servo.h>
#include <LiquidCrystal.h>

LiquidCrystal lcd(12,11,5,4,3,2);

const int servo1 = 9;       // first servo
const int servo2 = 8;       // second servo
const int joyH = 0;        // L/R Parallax Thumbstick
const int joyV = 1;        // U/D Parallax Thumbstick

int servoVal;           // variable to read the value from the analog pin

Servo myservo1;  // create servo object to control a servo
Servo myservo2;  // create servo object to control a servo

const int button2Pin = 1;     // the number of the pushbutton pin
const int ledPin =  7;      // the number of the LED pin

// Variables
int ledState = LOW;         // the current state of the output pin
int lastButtonState = LOW;   // the previous reading from the input pin

void setup() {

  // Servo 
  myservo1.attach(servo1);  // attaches the servo
  myservo2.attach(servo2);  // attaches the servo

lcd.begin(20, 4);

pinMode(button2Pin, INPUT);
  pinMode(ledPin, OUTPUT);

  // Inizialize Serial

void loop()
// read the state of the switch into a local variable:
int reading = digitalRead(button2Pin);

if (lastButtonState == LOW && reading == HIGH)
if (ledState == HIGH) {ledState = LOW;}
else {ledState = HIGH;}
digitalWrite(ledPin, ledState);}
lastButtonState = reading;

lcd.setCursor(0, 0);{
lcd.print("---Mark  Wapenaar---");
} lcd.setCursor(0, 1);{
lcd.print("Arduino Uno Project");
lcd.setCursor(0, 2);
if(analogRead(0) == 511){
lcd.print("Camera STOPPED");
} else if(analogRead(0) < 509) {
lcd.print("Camera Down   ");
} else if(analogRead(0) > 513) {
lcd.print("Camera Up     ");
lcd.setCursor(0, 3);
if(analogRead(1) == 511){
lcd.print("Camera STOPPED");
} else if(analogRead(1) < 509) {
lcd.print("Camera Left   ");
} else if(analogRead(1) > 513) {
lcd.print("Camera Right  ");

// Display Joystick values using the serial monitor

// Read the horizontal joystick value  (value between 0 and 1023)
servoVal = analogRead(joyH);         
servoVal = map(servoVal, 0, 1021, 0, 180);}     // scale it to use it with the servo (result  between 0 and 180)
myservo2.write(servoVal);                         // sets the servo position according to the scaled value

// Read the horizontal joystick value  (value between 0 and 1023)
servoVal = analogRead(joyV);}          
servoVal = map(servoVal, 0, 1021, 50, 180);     // scale it to use it with the servo (result between 70 and 180)
myservo1.write(servoVal);                           // sets the servo position according to the scaled value
delay(15);                                       // waits for the servo to get there


* Display joystick values
void outputJoystick(){

    Serial.print ("---");
    Serial.println ("----------------");

Step 4: Video

I hope you like this instructable! here is a video of the complete project =)

--------------Thank for reading this instructable and i hope this was helpfull for you ! ---------------
---------------------------------Have questions? leave a message behind.----------------------------------

Be the First to Share


    • Backyard Contest

      Backyard Contest
    • Silly Hats Speed Challenge

      Silly Hats Speed Challenge
    • Finish It Already Speed Challenge

      Finish It Already Speed Challenge

    7 Discussions


    5 years ago on Introduction

    Transmitting a video stream from ip camera to android phone through wifi, using arduino... may i know the steps? i really want to know.. please..


    7 years ago

    Can you edit the code and upload it to pastebin so I don't need to use the screen?


    Reply 7 years ago on Introduction

    Can't you copy the code on this page?


    7 years ago

    Can I use a simple digital camera?


    Reply 7 years ago on Introduction

    Yes you can, I recommend to make something like in the picture. In this way your camera has more support then when its only attached to the side of the servo.


    7 years ago

    How did you built the cam mount and what cam do you used?


    Reply 7 years ago on Introduction

    Here's the link to my instructable for the cam mount :)

    And for the Camera i used the Sentient Wired Camera. You can mount any cam or laser if you want, just re-design the mount attached to the servo.