Hi, I am using BSP for button detect. I wish to read the button Long Press of Different intervals. 3 Secs, 5 Secs etc.
Someone please help me achieving this. Some code snippets will be of great help.
Hi, I am using BSP for button detect. I wish to read the button Long Press of Different intervals. 3 Secs, 5 Secs etc.
Someone please help me achieving this. Some code snippets will be of great help.
I would not recommend using the bsp module (despite the fact that it is used in most BLE examples), but use the button module (app_button) instead. Take a look at this answer for an example on how to use it.
Use app_timer to check how long the button is pushed. For example, start a timer when button is pushed and stop it when it is released, the timer should be in repeated mode with a timeout of 1 second to count how many seconds the button is pushed. Take a look at the app_timer tutorial for how to use app_timer.
I would not recommend using the bsp module (despite the fact that it is used in most BLE examples), but use the button module (app_button) instead. Take a look at this answer for an example on how to use it.
Use app_timer to check how long the button is pushed. For example, start a timer when button is pushed and stop it when it is released, the timer should be in repeated mode with a timeout of 1 second to count how many seconds the button is pushed. Take a look at the app_timer tutorial for how to use app_timer.
Thanks So Much. It Works :)