good day,
is there a guide or tutorial on how to detect different press type in single button? will try to assign different tasks per button press types (single, double and long press)
using the PCA10040 and SDK17.1 for the development.
thanks
good day,
is there a guide or tutorial on how to detect different press type in single button? will try to assign different tasks per button press types (single, double and long press)
using the PCA10040 and SDK17.1 for the development.
thanks
Hi,
The app button library provide basic button support, including denouncing and events when a button is pressed and released. You can use that, and combine it with the app_timer to get support for long button pushes etc. This is done by the BSP library which you can also use, though that is a bit complex, so it might be just as easy to use the building blocks (app_button and app_timer) and add the logic for long button presses and double presses yourself. In this case, you can refer to the BSP implementation as an example. And if you want to use the BSP, you can refer to the BSP Example.