//AGREGAR LIB DEL SERVO
//Navarro Victor
#include <Servo.h>
//definir variables
Servo miservo;
int pottpin = 0;
int val;//variable del pott que lee A1
void setup() {
// put your setup code here, to run once:
miservo.attach(9);
}
void loop() {
// put your main code here, to run repeatedly:
val = analogRead(pottpin);
val = map(val, 0, 1023, 0, 180);// valor 10 bits angulo 0 a 180°
miservo.write(val);//posiciona al servo
delay(15);
}