#include <Servo.h>
Servo servo1;
int potin;
void setup()
{
servo1.attach(9);
}
void loop()
{
potin = analogRead(A0);
potin = map(potin, 0, 1023, 0, 180);
servo1.write(potin);
delay(15);
}
#include <Servo.h>
Servo servo1;
int potin;
void setup()
{
servo1.attach(9);
}
void loop()
{
potin = analogRead(A0);
potin = map(potin, 0, 1023, 0, 180);
servo1.write(potin);
delay(15);
}