pololu / dual-vnh5019-motor-shield

Arduino library for the Pololu Dual VNH5019 Motor Driver Shield
http://www.pololu.com/product/2507
MIT License
51 stars 76 forks source link

Add note about Timers and recommended pins to avoid with additional libraries #15

Open photodude opened 8 years ago

photodude commented 8 years ago

Reference issue #7 some libraries and functions conflict with PWM use, avoiding PWM pins on Timer 1 on the uno or Timer 5, or timer 2, on the mega

Some References

photodude commented 7 years ago

@ryantm @kevin-pololu @DavidEGrayson, any thoughts on merging this PR?

photodude commented 6 years ago

@ryantm any thoughts on merging this PR? or closing?

ryantm commented 6 years ago

@photodude Since we are pretty sure we aren't going to support different timers in the library at this time, I think we should close this. Are you okay with that?

photodude commented 6 years ago

This isn't so much about supporting different timers, as it is a cautionary note indicating an area where people might run into issues with timer conflicts. I personally ran into this information in trying to use the default servo library with the dual-vnh5019-motor-shield, I had all kinds of problems until I found out about the timer conflicts.

photodude commented 1 year ago

@ryantm any thoughts on merging this PR? or closing? Just want to emphasize this PR is only a cautionary note indicating an area where people might run into issues with timer conflicts.

DavidEGrayson commented 1 year ago

This pull request has a lot of information, so it will be hard to verify all of it hard to keep it updated as the third-party libraries you refer to change over the years. Also, note that this library doesn't just work on AVRs, but also works on a wide variety of Arduino-compatible boards, so we don't want to make blanket statements like "Timer0 is used by millis()". I don't think we should try to document every possible timer and pin conflict that could happen, but if there are one or two particular conflicts that you think actually happened to a real user in the real world and cost them a lot of time when debugging, that would be good to hear about.

photodude commented 1 year ago

@DavidEGrayson Understood. Maybe the best way to handle this is a shorter cautionary note in the readme file to check timer and pin conflicts with various boards and additional libraries. In my case, it was a conflict between certain pins in the dual-vnh5019-motor-shield, the servo library and the Arduino mega which caused all kinds of issues for our project. My experience is limited to use with Arduino Mega and Uno boards.

I think a good cautionary note about potential timer and pin conflicts especially when integrating with additional libraries like the servo library would have been sufficient to have quickly set our team on the right path for identifying the conflicts which broke the code, motor and servo functions.