#include <Servo.h>
Servo my_servo;
void setup() {
// put your setup code here, to run once:
my_servo.attach(3);
}
void loop() {
// put your main code here, to run repeatedly:
int position = analogRead(0);
int angle = map(position, 0, 1023, 0, 180);
my_servo.write(angle);
delay(700);
}