Make a Motorized Camera Slider with Joystick Controlled | DIY

Today, I made an Arduino controlled camera slider. There are many cheap sliders available but none that are motorized. So, I made my own using a stepper motor, a belt pulley, few wood sticks and an Arduino. It is also possible to control the camera direction with a joystick. The total cost of the project is about $ 40. Required Hardware: Wooden Sticks - Servo Motor - 18650 Battery Holder - 18650 Battery + Charger - Stepper Motor + ULN2003 - GT2 Pulley 40 Teeth - GT2 Pulley 36 Teeth - Belt - Cylinder Liner 10mm - Roller Bovine Wheel - Breadboard - Jumper Wires - Joystick Module - Arduino Compatible Nano - Hot Melt Glue Gun - Camera Tripod Holder - Optional Products: 16MP Ultra HD Action Camera - XIAOMI Wowstick - ------------------------------------------------------------------------ Studio Equipment: Studio Lighting Softbox - Adjustable SoftBox Tripod - Zhiyun Smooth Q Gimbal - Xiaomi Mi6 - Magnetic Blue Mat - ------------------------------------------------------------------------ Social Media: Subscribe to Channel - Facebook - Instructables -

Source Code:
#include <Servo.h>
#include <Stepper.h>

#define bottomServoPin 3  //Digital PWM pin used by the bottom servo
#define upperServoPin 5   //Digital PWM pin used by the upper servo
#define bottomJoyPin 1    //Analog pin to which the joystick (Y) is connected for the bottom servo control
#define upperJoyPin 2     //Analog pin to which the joystick (X) is connected for the upper servo control
#define stepperJoyPin 0   //Analog pin to which the joystick is connected for the stepper motor control
#define stepsPerRev 64    //Change this to fit the number of steps per revolution for your motor
#define stepperSpeed 50  //Speed of the stepper motor

//Digital pins to which the stepper motor drive is connected
#define IN1 8
#define IN2 9
#define IN3 10
#define IN4 11

//Servo objects created to control the servos
Servo bottomServo;
Servo upperServo;

//Stepper object created to control the stepper motor
Stepper stepperMotor(stepsPerRev, IN1,IN3,IN2,IN4);

//Variables created for joystick values
int bottomJoyVal;
int upperJoyVal;
int stepperJoyVal;

/* Below there is nothing to change, all variables and pins are defined above.
 * In the following section, you can only set the joystick threshold value and 
 * the maximum and minimum angle values at which the servo motor will rotate.*/

void setup(){

void loop(){
  bottomJoyVal = analogRead(bottomJoyPin);
  upperJoyVal = analogRead(upperJoyPin);
  bottomJoyVal = map(bottomJoyVal, 0, 1023, 60, 120);
  upperJoyVal = map(upperJoyVal, 0, 1023, 60, 120);

  stepperJoyVal = analogRead(stepperJoyPin);
  if(stepperJoyVal < 450) {stepperMotor.step(1);}
  if(stepperJoyVal > 550) {stepperMotor.step(-1);}