#include <Servo.h>
Servo myservo;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
myservo.attach(10);
}
void loop() {
// put your main code here, to run repeatedly:
int hodnota = analogRead(A0);
Serial.println(hodnota);
delay(200);
myservo.write((int) ((hodnota/1023.0)*180.0));
}