I noticed that there are a few methods in nRF52 SDK v16 to blink LEDs:
I am wondering which is better?
My use case is to use LED indicate various running status defined by my app, the status is not same as those bsp led indicate since I don't want distinguish low level BLE status.
Currently I am using led soft blink library but I found I can't fully control the effects. I am only using one LED and trying to use different on/off cycles for different status. So I initialize and started the soft blinker once and upon each status change, I use led_softblink_off_time_set() and led_softblink_on_time_set() to adjust the on/off cycles.
I am using the following values:
I am expecting the blinking frequency for state1 is 1hz, for state2 is 0.5hz, and for state 3 is 0.2hz. But I am unsure if this arrangement is obvious or not.
Meanwhile, I can't feel too much differences if I use 250ms for State1.
The softblink library seems appropriate for you application, and the frequency calculations is correct. However, if you're using the Development kit then you could consider to give each state a specific LED and blink that LED when you're in that state. You only have 3 states so the 4 LEDS on the DK should be enough.