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

Configuration of Digital Input/Output pins on nRF52

Hello everybody, I'm new to the Nordic system and the nRF52. I'm trying to become familiar with the board and I want to be able to read different 4 input pins, each one attached to the LEDs. In few words, I'm looking to do something like this.

if(button_1 pressed)

if(button_2 pressed)

if(button_3 pressed)

if(button_4 pressed)

I have tried the example that comes with the SKD pin_change_int_pca10040. I have tried to modify the code with no luck. Any advice will be appreciate it.

Would I be able to use the following function to change the state of the pin from 0 to 1?


Also, will this one will change the state of the pin from 1 to 0


How could I read the state change on the pin?

Thank you for your help