Hello Everyone,
I would like to implement a random delay of 10 to 3000ms before my development kit start advertising itself.
I'm using nRF5dk v17.1.0.
How do i go about this?
Regards,
Zachary
Hello Everyone,
I would like to implement a random delay of 10 to 3000ms before my development kit start advertising itself.
I'm using nRF5dk v17.1.0.
How do i go about this?
Regards,
Zachary
Hi Kazi,
Apologies for the late reply. I need this feature to prevent two devices to advertising at the same time.
I would like to place the random delay of 0 to 3 seconds at the start so that once the device is powered up, it will there will be a delay buffer before it initial to advertise or other event such as reading adc or scan.
Regards,
Zachary
Hello Zachary,
You need to set how long the app_timer instance should be delayed until it executes. So a while loop like this will be there-
while(wait_for_this_variable)
the formula of delayed app inside the nrf_delay_ms () function cna be implemented like this:
nrf_delay_ms((random_16_bit_number + 10) % 3000)
Try to implement this in your code.
Best Regards,
Kazi Afroza Sultana