Skip to content

Commit 02ab36e

Browse files
committed
Fix #11 by scaling frequency by 0.9.
1 parent 85953ad commit 02ab36e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Adafruit_PWMServoDriver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ void Adafruit_PWMServoDriver::reset(void) {
4040
void Adafruit_PWMServoDriver::setPWMFreq(float freq) {
4141
//Serial.print("Attempting to set freq ");
4242
//Serial.println(freq);
43-
43+
freq *= 0.9; // Correct for overshoot in the frequency setting (see issue #11).
4444
float prescaleval = 25000000;
4545
prescaleval /= 4096;
4646
prescaleval /= freq;

0 commit comments

Comments
 (0)