mathertel / OneButton

An Arduino library for using a single button for multiple purpose input.
http://www.mathertel.de/Arduino/OneButtonLibrary.aspx
Other
920 stars 230 forks source link

attachPressStart removed, attachLongPressStart can be used instead, but how?? #116

Closed ewidance closed 7 months ago

ewidance commented 1 year ago

Changelog for 2.0.0 says: "The function attachPressStart() is removed as attachLongPressStart() does the same but also supports parameters.". Ok, but i can't figure out the way i could remplace attachPressStart with an attachLongPressStart, and how parameters could help.

See for example code in https://github.com/maestun/zoom-multistomp-patch-changer/blob/master/zoom-multistomp-patch-changer.ino#L100

Any example to replace that?

Thanks a lot! JPC

mathertel commented 7 months ago

just use button.attachLongPressStart(...) instead of button.attachPressStart(...)

I hope that help.