blemasle / arduino-mcp23017

Complete support of MCP23017
MIT License
71 stars 40 forks source link

delay time for a bounce switch #5

Closed bill-in-iowa closed 5 years ago

bill-in-iowa commented 5 years ago

On the 23017 Arduino Library, I changed the delay statement for the switch bounce to checking the io pin according to the timimg on the data sheet instead of waiting the 200 milliseconds. For me the I2C is slow enough without waiting 200ms every time a switch is pressed

blemasle commented 5 years ago

Hi,

Could you point me to what part of the code you're referring to ? The only delay I can find in the library code is in the example.

It is of course an example that you can adapt as you wish depending on your needs :)

bill-in-iowa commented 5 years ago

I'll look again, was thinking it was in the c++library . I've had to change several libraries that use delays as a way to time circuits. Thanks for replying so quickly

On May 1, 2019 3:50 AM, Bertrand Lemasle notifications@github.com wrote:

Hi,

Could you point me to what part of the code you're referring to ? The only delayhttps://github.com/blemasle/arduino-mcp23017/blob/7fe183a1a2f8e930fe424279f9639c04caf7ae78/examples/PortCopyOnInterrupt/PortCopyOnInterrupt.ino#L43 I can find in the library code is in the example.

It is of course an example that you can adapt as you wish depending on your needs :)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/blemasle/arduino-mcp23017/issues/5#issuecomment-488237821, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AKVNSWAH3QIQ2PIL5PHA6NLPTFKU7ANCNFSM4HJPT7NA.

blemasle commented 5 years ago

Any news on this @bill-in-iowa . Otherwise I'll close the issue :)