evert-arias/EasyButton

Enhancement: Periodic callback when button is held down

fastbike opened this issue · 1 comments

My use case is for a light switch that normally functions as a momentary switch, but acts as a dim up/dim down switch when it is held for more than 250ms.

So to achieve this I have attached a function for the onPressedFor callback


I would then like another function to be called back every 50 ms so the lighting can be ramped up or down
````    powerButton.onPresseContinuesr(50, keepDimming); // notify the dimmer to move down a level

I have made some changes to a fork of the code. Are you interested in reviewing them for a pull request ?

You can see my changes here, feel free to use
fastbike@ed3ad10