Introduction
Parts Of List
- Arduino Uno
- Servo Motor-3
- Potentiometer-3
- Bread Board
- Hook Up wires
Potentiometer
A Potentiometer is informally a pot and is a three-terminal resistor with a sliding or rotating contact, which forms an adjustable voltage divider. If it has only two terminals, which are used- one end and the wiper, it acts as a variable resistor or rheostat.

Figure1 - Potentiometer
Servo Motor

Figure 2 - Servo Meter
- It is small and cost-effective.
- It is used for small Robotics and radio controls.
Connection From Servomotor To Arduino Uno
- Connect the GND and VCC in the three motors commonly to the Arduino board.
- Vin pins are connected in the digital pin, as mentioned in the program.
Connection From Potentiometer To Arduino Uno
- Connect GND and VCC in the three Potentiometer commonly to the Arduino board.
- Vin pins are connected in the digital pin, as mentioned in the program.
Programming
Explanation
- #include < Servo.h > Servo myservo3;
- Servo myservo5;
- Servo myservo6;
- int potpin = 0;
- int potpin2 = 1;
- int potpin3 = 2;
- int val = 0;
- int val2 = 0;
- int val3 = 0;
- void setup() {
- myservo3.attach(9);
- myservo5.attach(10);
- myservo6.attach(11);
- }
- void loop()
- {
- val = analogRead(potpin);
- val = map(val, 3, 1023, 0, 176);
- myservo3.write(val);
- delay(25);
- val2 = analogRead(potpin2);
- val2 = map(val2, 3, 1023, 0, 176);
- myservo5.write(val2);
- delay(25);
- val3 = analogRead(potpin3);
- val3 = map(val3, 3, 1023, 0, 175);
- myservo6.write(val3);
- delay(25);
- }
- Connect Potentiometer and the Servometer in Arduino board and rotate the Potentiometer and see the output in the Servometer.
- It can be applied for the home Application also.
Output

Figure 3 - Output

SubashPosted Oct 17, 2016, 6:34 AM
Very nice explanation kirthiga
Anu VPosted Oct 17, 2016, 12:14 AM
Nice...