I have this project in witch I have 7 buttons
4 controlls air temperature and air speed, 3 buttons that are left is responsible for presets
So I have to build button scan/poll routine.
What it has to do:
- support short press
- long press and repeat function (if held down it should repeat function every n times a sec)
- individual hold time definition if possible
Mcu is atmega16
I do know that I have to use timer of mcu to poll buttons, but how often, at the same time I have to control pwm signal and send data to display. So if I do it to often, like 5ms timer, it interferes with lcd and other stuff
P.S I saw some libs for multiple buttons.
But documentarion is close to norhing and I do not know how to implement it...
Do tou have some tips on how to design this type of routine?