Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Arduino delayMicroseconds() doesn't work for values larger than about 16K and this
broke the step() delay calculation causing almost random speed results for many RPM
settings. Added longDelayMicrosecond() function to resolve this.
Also added timing of I2C overhead with delay time adjustments to allow RPM values
to be very close to what they are set for, even when I2C bus rates are changed.
Include of Adafruit_MS_PWMServoDriver.h changed in Adafruit_MotorShield.cpp to be
consistent with other uses. (not needed for RPM fix -- just seemed "broken" -- ok, it's risky changing something that isn't broken, I know).
I've tested this only an an Arduino Mega 2560 with a V2.3 Adafruit Motor control board.