I search GPIO pin bit definations and register. I saw pca10040.h GPIO defined.I dont know how to configurated P1DIR, P1EN, P1OUT etc.. I studied Texas Instrument before. I was not get used to Nordic =( Nordic is very wired. Sorry. I hate ARM.
I search GPIO pin bit definations and register. I saw pca10040.h GPIO defined.I dont know how to configurated P1DIR, P1EN, P1OUT etc.. I studied Texas Instrument before. I was not get used to Nordic =( Nordic is very wired. Sorry. I hate ARM.
nrf_gpio_cfg_input(SATIR_1, NRF_GPIOTE_POLARITY_LOTOHI); nrf_gpio_pin_read(SATIR_1); while(1) { if(nrf_gpio_pin_read(SATIR_1) == true) { nrf_gpio_pin_set(LED_DENEME); nrf_delay_ms(200); nrf_gpio_pin_clear(LED_DENEME); } else { nrf_gpio_pin_clear(LED_DENEME); } }
Changed something. But when i pressed button led must be blink 200ms. This situation when i pressed button led blink, when i release button led off. How can i change code?
The LEDs on the DK are active low. Also watch out for button bouncing. The Button handling library handles de-bouncing for you.