Arduino Demo Code
Arduino Servo Control Code:
#include <Servo.h>
Servo myservo;
int pos = 0;
void setup()
{
myservo.attach(9);
}
void loop()
{
for(pos = 5; pos <= 75
; pos += 1)
{
myservo.write(pos);
delay(15);
}
delay(2000);
for(pos = 75; pos>=5; pos-=1)
{
myservo.write(pos);
delay(15);
}
delay(750);
}
Welcome to the University Wiki Service! Please use your IID (yourEID@eid.utexas.edu) when prompted for your email address during login or click here to enter your EID. If you are experiencing any issues loading content on pages, please try these steps to clear your browser cache.