144 if ( angleArg < 0) angleArg = 0;
145 if ( angleArg > 180) angleArg = 180;
155 uint8_t count = 0, i = 0;
158 static unsigned long lastRefresh = 0;
159 unsigned long m = millis();
162 if ( m >= lastRefresh && m < lastRefresh + 20)
return;
166 if ( count == 0)
return;
175 for ( i = 1; i < count; i++) {
193 for ( i = 0; i < count; i++) digitalWrite( s[i]->
pin, 1);
195 uint8_t start = TCNT0;
200 for ( i = 0; i < count; i++) {
201 uint16_t go = start + s[i]->
pulse;
207 if ( now < last) base += 256;
210 if(base + now >= go - 16)
215 if ( base+now > go) {
216 digitalWrite( s[i]->
pin,0);
void detach()
Detaches the servo motor from the uStepper.
void setMaximumPulse(uint16_t t)
Sets the maximum pulse.
uint8_t attach(int pinArg)
Attaches the servo motor to a specific pin.
class uStepperServo * next
Prototype of class for ustepper servo.
static void refresh()
Updates servo output pins.
uStepperServo()
Constructor for servo class.
Function prototypes and definitions for the uStepper Servo library.
void write(int angleArg)
Specify angle of servo motor.
void setMinimumPulse(uint16_t t)
Sets the minimum pulse.
static uStepperServo * first