Closed smarthusker closed 5 years ago
If Adafruit_PWMServoDriver pwm = Adafruit_PWMServoDriver(0x40, &Wire); is used, the code executes as expected.
@smarthusker if you use the master branch from github instead of v1.0.4 does that help
I did grab the latest .cpp and .h files that were updated 3days ago without any difference in behavior.
Sent from my iPhone. Please excuse brevity and typos.
On Jul 27, 2019, at 3:51 PM, ladyada notifications@github.com<mailto:notifications@github.com> wrote:
@smarthuskerhttps://github.com/smarthusker if you use the master branch from github instead of v1.0.4 does that help
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/adafruit/Adafruit-PWM-Servo-Driver-Library/issues/58?email_source=notifications&email_token=AHXG6FXXYKBCCSN6J566MTTQBS7PLA5CNFSM4IHKFM32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD26THXY#issuecomment-515716063, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AHXG6FTGGZ4CGGCKA75G42TQBS7PLANCNFSM4IHKFM3Q.
tested it today with feather PCA9685 and esp32 - all works fine. edited all the examples - PR #59
ok merged, @smarthusker plz try master branch again :)
Same issue as: https://github.com/adafruit/Adafruit-PWM-Servo-Driver-Library/issues/50
I still feel that passing in the Wire as a pointer is pointless and unsafe. using a reference would be much safer and completely prevent errors such as these where the i2c address is being used as a pointer.
@sticilface wanna submit a PR and we'll try it out?
we believe this is fixed by @Bolukan 's awesome PR please try v2.1.0 when it appears in your library manager, and re-open if still an issue!
Arduino board: Arduino Uno and Mega 2560
Arduino IDE version: Arduino IDE 1.8.9 (Windows Store 1.8.21.0)
List the steps to reproduce the problem below (if possible attach a sketch or copy the sketch code in too): 1) Open Arduino IDE using Adafruit-PWM-Servo-Driver-Library v1.0.4. 2) Open example sketch pwmtest. 3) Compile and load pwmtest without any changes to Arduino and verify it runs as expected. 4) Edit line 23 to use ANY I2C address, even default of 0x40. ie: Adafruit_PWMServoDriver pwm = Adafruit_PWMServoDriver(0x40); 5) Compile and load modified example sketch to Arduino. Arduino will reset. 6) Repeat steps with the example servo.