User Manual
myservo.attach(CRICKIT_SERVO1);
to, say,
myservo.attach(CRICKIT_SERVO1, 750, 2250);
Here we've change the minimum pulse from the default 1000 microseconds to 750, and the default maximum pulse
from 2000 microseconds to 2250. Again, each servo differs. Some experimentation may be required!
Continuous Rotation Servos
If you're using continuous servos, you can use the angle assignments and just remember that 0 is rotating one way, 90
is 'stopped' and 180 and rotating the other way.
If your continuous servo doesn't stop once the script is finished you may need to tune the min and max pulse timings
so that the center makes the servo stop. Or check if the servo has a center-adjustment screw you can tweak.
Disconnecting Servos or Custom Pulses
If you want to 'disconnect' the Servo by sending it 0-length pulses, you can do that by 'reaching in' and adjusting the
underlying PWM duty cycle with:
myservo.writeMicroseconds(0);
Likewise you can set the duty cycle to a custom value with
myservo.writeMicroseconds(number);
where
number
is the pulse length is microseconds between 0 (off) and 20000 (fully on). For example, setting it to
10000 will be 50% duty cycle, at the 50 Hz update rate
© Adafruit Industries
https://learn.adafruit.com/adafruit-crickit-creative-robotic-interactive-
construction-kit
Page 174 of 201










