#include <Servo.h>
Servo myservo;
int nilai = 0;
int potentio = A0;
int nilai_potentio;
void setup() {
// put your setup code here, to run once:
myservo.attach(6);
}
void loop() {
nilai_potentio = analogRead(potentio);
nilai_potentio = map(nilai_potentio, 0, 1023, 0, 180);
myservo.write(nilai_potentio);
delay(15);
}