Control output of a GPIO with just one LED. Control input of a GPIO with one button.
Control output of a GPIO with just one LED. Control input of a GPIO with one button.
Have you tried BSP example from nRF5 SDK? Anything unclear there?
One way to configure the GPIOs is to use the nrf_gpio interface directly:
Configure pin as output: nrf_gpio_cfg_output(pin_number)
Configure pin as input : nrf_gpio_cfg_input(pin_number)
Turn on/off the LED:
nrf_gpio_pin_set(pin_number) nrf_gpio_pin_clear(pin_number)
Hope that helps!
Regards Joakim
Hi endnode, i am unable to work with buttons(Keys). There is some problem in button configuration. Can you provide some sample code for that?????? I am using PCA10040 development board. Can provide any help for that
Thank you Joakim.
Did you take a look in the infocenter about the BSP or about the Button Handler?