#include <Servo.h>
Servo myServo;
int const potPin =A0;
int potVal;
int angle;
Servo myServo1;
int const potPin1 =A1;
int potVal1;
int angle1;
int switchState = 0;
void setup() {
//const int switchPin = 13;
//if(switchPin HIGH)
pinMode(13, OUTPUT);
pinMode(7, INPUT);
myServo.attach(9);
Serial.begin(9600);
myServo1.attach(8);
}
void loop() {
switchState = digitalRead(13);
if (switchState == HIGH)
digitalWrite(13, HIGH);
potVal = analogRead(potPin);
angle = map(potVal, 0, 1023, 0, 179);
myServo.write(angle);
//delay(15);
potVal1 = analogRead(potPin1);
angle1 = map(potVal1, 0, 1023, 0, 179);
myServo1.write(angle1);
//delay(15);
}