#include <Servo.h>
Servo myServo;
Servo myServo2;
int const potPin = A0;
int potVal;
int angle;
int const slidePotPin = A1;
int slidePotVal;
int course;
void setup()
{
myServo.attach(9);
myServo2.attach(8);
Serial.begin(9600);
}
void loop()
{
potVal = analogRead(potPin);
slidePotVal = analogRead(slidePotPin);
Serial.print("slide pot : ");
course = map(slidePotVal, 0, 1023, 0, 100);
Serial.print(course);
Serial.print(", potVal: ");
Serial.print(potVal);
angle = map(potVal, 0, 1023, 0, 179);
Serial.print(", angle: ");
Serial.println(angle);
myServo.write(angle);
myServo2.write(angle);
delay(15);
}