app_button doesn't recognize the first button release if button is pressed before app_button_init

 Hi Nordic team,

I'm using S132 with nRF5_SDK_17.1.0_ddde560 on nRF52832. I realize that the app_button library doesn't detect the first button release if the button is already pressed before app_button_init is executed. How can I overcome this problem so I can still detect the first button release?

Thank you for your help.

Best regards,

Xander

Parents Reply
  • If current state is "release_detected", and button is pressed (value 1) then new state becomes "pressed"

    If current state is "release_detected", and button is released (value 0) then new state becomes "idle"

    Similarly,

    if the current state is "idle" and button is released (value 0) then the new state is still "idle";

    It would not say released detected.

    However, if you wish you can update the code as per your needs.

Children
No Data
Related