New Project

CONNECT

Pan Tilt Controlled with Potentiometer

  • Page Views 1042
  • Spread the love
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  

    In this project, two potentiometer connected to our Arduino Uno 2 servo motor-driven apparatus that allows camera control Pan-Tilt Fpv we checked cheaper cost.Checking Pan Tilt can start Pan Tilt Controlled with Potentiometer project.

    Materials:

    1. Arduino Uno
    2. Servo motors SG90
    3. 2 potentiometer 20k
    4. Pan-Tilt
    5. Breadboard
    6. Jumper cables

    Electronic Section:
    Circuit Connections:

    Potentiometer Analog 1 and Analog 2 pins

    Digital 5 and 6 pins to digital servo motors

     

     

    Software Part:

    #include <Servo.h>
    
    const int pot1=A1;
    const int pot2=A2;
    Servo myservo1;
    Servo myservo2;
    int deger=0;
    int pos = 0;
    void setup(){
    myservo1.attach(5);
    myservo2.attach(6);
    }
    void loop(){
    deger=analogRead(pot1);
    pos=map(deger,0,1023,0,180);
    {
    myservo1.write(pos);
    }
    deger=analogRead(pot2);
    pos=map(deger,0,1023,0,180);
    {
    myservo2.write(pos);
    }
    }

    Share

    What did they say ?

    First Comment About You!!

    avatar
    wpDiscuz

    BE A FACEBOOK FAN

    Instagram