Controlling Multiple servo motor with multiple Potentiometer

Posted by admin 23/08/2018 1 Comment(s)

 

Controlling Multiple servo motor with

multiple Potentiometer


Circuit Diagram :


 

 

Servo-1 connection with Arduino
ServoArduino
VCC5V
GNDGND
SignalD9

 

 

Servo-2 connection with Arduino
ServoArduino
VCC5V
GNDGND
SignalD10

 

 

Potentiometer-1 connection with Arduino
Potentiometer (10k Ohm)Arduino
Fixed End15V
Fixed End2GND
Variable EndA0

 

 

Potentiometer-2 connection with Arduino
Potentiometer (10k Ohm)Arduino
Fixed End15V
Fixed End2GND
Variable EndA1

 

 

 


Code

 

 

//Coded by Moudud Ahmed,Facebook- https://web.facebook.com/people/Moudud-Ahmed/100022755660713
//Powered by https://www.electronics.com.bd/

 

 

#include <Servo.h>

Servo myservo1;
Servo myservo2;

int potpin = 0;
int potpin1 = 1;


int val = 0;
int val1 = 0;


void setup()
{

myservo1.attach(9);
myservo2.attach(10);


}

void loop()
{

val = analogRead(potpin);
val = map(val, 3, 1023, 0, 176);

myservo1.write(val);

delay(25);

val1 = analogRead(potpin1);
val1 = map(val1, 3, 1023, 0, 176);

myservo2.write(val1);

delay(25);


}


 

 

 

1 Comment(s)

Fahad Elahi Khan:
19/12/2018, 07:08:13 PM
Reply

Bro can you make a arduino uno based remote control more than 10 channels

Moudud Ahmed:
10/04/2019, 07:13:10 PM

yes

Write a Comment