Hello ,
i use blinky example from C:\Keil_v5\ARM\Device\Nordic\nrf51822\Board\pca10001 folder. I want to flash the led with periods (period of 30 ms turn on 10 ms off)
if you can help me .
thank you
Hello ,
i use blinky example from C:\Keil_v5\ARM\Device\Nordic\nrf51822\Board\pca10001 folder. I want to flash the led with periods (period of 30 ms turn on 10 ms off)
if you can help me .
thank you
Hi,
I don not know what SDK version you are using, but this is written assuming SDK v4.4.2.
You should be able to achieve this functionality by changing the while loop to something like this:
nrf_gpio_port_write(LED_PORT, 1 << (output_state + LED_OFFSET)); output_state = (output_state + 1) & BLINKY_STATE_MASK; nrf_delay_ms(30); nrf_gpio_port_write(LED_PORT, 1 << (output_state + LED_OFFSET)); output_state = (output_state + 1) & BLINKY_STATE_MASK; nrf_delay_ms(10);
Best regards,
Jørgen
Hello,
thank you ,I am using nRF SDK 12.2.0 , with nRF52832 on pca10040 hardware.
hi,
try new sdk 14.2
regards
This does not correspond with the information you gave in the initial post. PCA10001 is nRF51 series, and there is no such directory (C:\Keil_v5\ARM\Device\Nordic\nrf51822\Board\pca10001) related to SDK 12.2.0. Please use latest SDK (14.2.0), and the blinky example projects found in examples\peripherals\blinky\pca10040\blank\.
hi,
in sdk 14.2 in blinky example. try something like this in your main loop.
nrf_gpio_pin_set(LED_1);
nrf_delay_ms(30);
nrf_gpio_pin_clear(LED_1);
nrf_delay_ms(10);
hi,
in sdk 14.2 in blinky example. try something like this in your main loop.
nrf_gpio_pin_set(LED_1);
nrf_delay_ms(30);
nrf_gpio_pin_clear(LED_1);
nrf_delay_ms(10);
Thank you
hi,
if i answered you correctly. please accept it