145 if ( angleArg < 0) angleArg = 0;
146 if ( angleArg > 180) angleArg = 180;
156 uint8_t count = 0, i = 0;
159 static unsigned long lastRefresh = 0;
160 unsigned long m = millis();
163 if ( m >= lastRefresh && m < lastRefresh + 20)
return;
167 if ( count == 0)
return;
176 for ( i = 1; i < count; i++) {
194 for ( i = 0; i < count; i++) digitalWrite( s[i]->
pin, 1);
196 uint8_t start = TCNT0;
201 for ( i = 0; i < count; i++) {
202 uint16_t go = start + s[i]->
pulse;
208 if ( now < last) base += 256;
211 if(base + now >= go - 16)
216 if ( base+now > go) {
217 digitalWrite( s[i]->
pin,0);
Prototype of class for ustepper servo.
uStepperServo()
Constructor for servo class.
class uStepperServo * next
uint8_t attach(int pinArg)
Attaches the servo motor to a specific pin.
void write(int angleArg)
Specify angle of servo motor.
static void refresh()
Updates servo output pins.
void setMinimumPulse(uint16_t t)
Sets the minimum pulse.
void setMaximumPulse(uint16_t t)
Sets the maximum pulse.
void detach()
Detaches the servo motor from the uStepper.
static uStepperServo * first
Function prototypes and definitions for the uStepper Servo library.