Introduction: DIY Photography Slider

hello everyone! this is my project for a DIY camera slider, i had a difficult time with mine, but i'm sure if you pay more attention to detail it will work!

in theory, this should fully work

if you choose to do this i hope you enjoy it!

Step 1: Gather You Materials

Electronic Materials

  • Arduino
  • two 360 servos
  • bread board
  • resistors
  • buttons (preferably 3)

Building materials

  • two pieces of foam board
  • wooden pieces of dowel (can be metal)
  • wooden oval shaped pieces (refer to picture intro image).

Step 2: Setup!

this photo is the circuit diagram

follow this and your project will work!

Step 3: Assembly of Breadboard!

  • first of all connect positive and ground to the breadboard.
  • second connect the two servos... and have two wires running to ground and positive, and another to the pin you would choose. (note the code will have the pins i chose)..
  • then assemble your buttons... remember to connect to the pins of your choice but the code will not work if you do not use the pins i chose. connect the buttons to ground as well.
  • and use a 220 resistor.
  • lastly, if you would like to use a LCD monitor you will have to connect 2 pins to analog input and one wire to the positive terminal.

Step 4: The Arduino Code!

#include
#include #include

LiquidCrystal_I2C lcd(0x27,16,2); // set the LCD address to 0x27 for a 16 chars and 2 line display

Servo servoLeft; // Define left servo Servo servoRight; // Define right servo

const int startbut = 8; //pin for startbut (startbutton) const int forwardbut = 12; //pin for forwardbut (forwardbutton) const int reversebut = 13; //pin for reversebut (reversebutton) int tim = 500; //the value of delay time int flag = 0; int count = 0;

char array1[]=" welcome "; //the string to print on the LCD ("welcome") char array2[]="push left=LEFT,right=RIGHT !"; //the string to print on the LCD ("push left=LEFT, right=RIGHT")

void setup () { servoLeft.attach(10); // Set left servo to digital pin 10 servoRight.attach(9); // Set right servo to digital pin 9 servoLeft.write(90); // set servos to 90 degrees servoRight.write(90); delay(100);

//turns the pin to inputs pinMode(startbut,INPUT); //initialize the startbut (startbutton) as an input pinMode(reversebut,INPUT); //initialize the reversebut (reversebutton) as an input pinMode(forwardbut,INPUT); //initialize the forwardbut (forwardbutton) as an input

}

void loop() { // Loop through motion tests //code for LCD monitor if (flag == 1 && count == 0) { count = 1; lcd.init(); //initialize the lcd lcd.backlight(); //open the backlight

lcd.setCursor(15,0); // set the cursor to column 15, line 0 for (int positionCounter1 = 0; positionCounter1 < 26; positionCounter1++) { lcd.scrollDisplayLeft(); //Scrolls the contents of the display one space to the left. lcd.print(array1[positionCounter1]); //Print a message to the LCD. delay(tim); //wait for 250 microseconds } lcd.clear(); //Clears the LCD screen and positions the cursor in the upper-left corner. lcd.setCursor(15,1); //set the cursor to column 15, line 1 for (int positionCounter = 0; positionCounter < 26; positionCounter++) { lcd.scrollDisplayLeft(); //Scrolls the contents of the display one space to the left. lcd.print(array2[positionCounter]); //Print a message to the LCD. delay(tim); //wait for 250 microseconds } lcd.clear(); //Clears the LCD screen and positions the cursor in the upper-left corner. } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

/check if buttons pressed if (digitalRead(startbut) == 1) { flag = 1; //flag variable for button to start }

if (flag == 1){ if(digitalRead(reversebut) == HIGH) //reversebut pressed will turn on a servo { reverse(); //reverse variable for reversebutton } else if(digitalRead(forwardbut) == HIGH) //forwardbut pressed will turn on a servo { forward(); //forward variable for forwardbutton } else { stop(); //stop variable to stop motion of servos when buttons not pressed } }

}

// Motion routines for forward, reverse and stop void forward() { //forward command servoLeft.write(0); //direction in which servos turn servoRight.write(180); } void stop() { //stop command servoLeft.write(90); //stops both servos at the same spot, otherwise they would be in different positions servoRight.write(90); } void reverse() { //reverse command servoLeft.write(180); //servos activate in opposite direction servoRight.write(0); }

here is the code for success! after you've setup your arduino everything should work! and enjoy!

if it does not work be sure to look back at this instructable and check everything!