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