#include <Servo.h>
Servo myservo;
int value;
void setup() {
// put your setup code here, to run once:
myservo.attach(6);
}
void loop() {
// put your main code here, to run repeatedly:
value = analogRead(A1);
value = map(value,0,1023, 0,180);
myservo.write(value);
}