diff --git a/Promano.ino b/Promano.ino index f7dce4e..0461036 100644 --- a/Promano.ino +++ b/Promano.ino @@ -1,25 +1,33 @@ #include -Servo myServo; -int const potPin = A0; +Servo servo1; +int const potPin1 = A0; +Servo servo2; +int const potPin2 = A1; int potVal; int angle; void setup() { - myServo.attach(8); + servo1.attach(8); + servo2.attach(9); Serial.begin(9600); } void loop() { - potVal = analogRead(potPin); + potVal = analogRead(potPin1); angle = map(potVal, 0, 1023, 0, 179); - - Serial.print("Potval: "); + servo1.write(angle); + Serial.print("Potval1: "); Serial.print(potVal); + + potVal = analogRead(potPin2); + angle = map(potVal, 0, 1023, 0, 179); + servo2.write(angle); + Serial.print("Potval2: "); + Serial.print(potVal); + Serial.print(" Angle: "); Serial.print(angle); - myServo.write(angle); - delay(15); }