Adafruit-PWM-Servo-Driver-Library icon indicating copy to clipboard operation
Adafruit-PWM-Servo-Driver-Library copied to clipboard

Fix getPWM method and overload getPWM in header

Open driscollta opened this issue 4 years ago • 5 comments

This merge will fix broken getPWM method to actually read two bytes from PWM register, combine into 16 bit value and return. A parameter is needed to specify either the "ON" or "OFF" registers

An example is provided to test the new getPWM method by writing a value to the register, reading back and comparing the two values.

driscollta avatar Feb 17 '21 00:02 driscollta

hi please remove the main.cpp file (or you can rename it to a valid arduino example)

ladyada avatar Feb 17 '21 15:02 ladyada

Changed example name to testGetPWM.ino

driscollta avatar Feb 17 '21 16:02 driscollta

Changed main.cpp to testGetPWM.ino

On Wed, Feb 17, 2021, 7:24 AM ladyada [email protected] wrote:

hi please remove the main.cpp file

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/adafruit/Adafruit-PWM-Servo-Driver-Library/pull/84#issuecomment-780631118, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACSALE3TD4KXBR7XQFCCS2LS7PNSJANCNFSM4XXL5OLA .

driscollta avatar Feb 17 '21 16:02 driscollta

the eample has to go in a folder with the same name like all other examples

ladyada avatar Feb 17 '21 16:02 ladyada

ok now you need to run clang-format

ladyada avatar Feb 19 '21 18:02 ladyada

Closing. I think this was fixed as part of BusIO update. See #56 for more discussion.

caternuson avatar Aug 10 '23 16:08 caternuson