This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How the change the outcome of a button press action in nRF51 DK using app_button?

Hello!

I just want to change the outcome of Button 1 press action in my nRF 51 Dk. For example, instead of toggling led 1, I want to toggle pin 5. How to actually do that? I fiddled with the code, but up to now, no advance.

P.s.: I am using ble_app_hrs_c as my base code.

Thanks!!

Parents
  • It always helps if you post code if you are having trouble making something work.

    But if I had to guess your problem, I would bet that you forgot to configure a pin as an output before trying to drive it.

    Look at the blinky example as the simplest possible piece of code and start there. Look at how they first configure the pin as an output. If that still does not help, try posting code.

Reply
  • It always helps if you post code if you are having trouble making something work.

    But if I had to guess your problem, I would bet that you forgot to configure a pin as an output before trying to drive it.

    Look at the blinky example as the simplest possible piece of code and start there. Look at how they first configure the pin as an output. If that still does not help, try posting code.

Children
Related