Friday, May 2, 2014

Circuit #8 Single Servo Notes

Goal: Sweep a servo back and forth through its full range of motion.

Servo - Servomotor, a motor that includes feedback circuitry that allows it to be commanded to move to specific positions

#include<Servo.h> - Servo library. *This library disables PWM on pins 9 and 10!*

Servo servo1 - Servo control object

servo1.attach(pin) - Attach tells the Arduino to begin sending control signals to the servo. Servos require a continuous stream of control signals, even if you are not currently moving them.

servo.detach(pin) - Detaches servo. Servos cannot turn a full 360 degrees, but they can move between o degrees and 180 degrees.

servo1.write(degrees) - Tells the servo to move some number of "degrees."

Vilros Ultimate Starter Kit Tutorial Sketches 1-12