//control de servomotor
#include <Servo.h>
Servo miservo;
int pottpin = 0;
int val;//variable a lee
void setup() {
//put your setup code here, to run once:
miservo.attach(9);//attach servo
}
void loop() {
val = analogRead(pottpin);//
val = map(val, 0, 1023, 0, 180);//scala
miservo.write(val);//posiciona el servo
delay(15);
// put your main codo her, to run repeatedly:
}