I want to add a random delay in range 2000 to 3000 ms before my device perfrom any activity.
pls tell how can do this at earliest
usins some timer or something else
I want to add a random delay in range 2000 to 3000 ms before my device perfrom any activity.
pls tell how can do this at earliest
usins some timer or something else
The warning you're seeing is due to the types not matching.
You can either cast the input, like so:
err_code = sd_rand_application_vector_get((uint8_t *)&rand_value, sizeof(rand_value));
or declare rand_value as a uint8_t array: uint8_t rand_value[2];
For the sd_rand_* API to provide you with random bytes, you need to call this after the softdevice has been initialized (ie. after ble_stack_init()).
Kind regards,
Håkon
Hakon i tried cast input function you are telling also, still no random delay is showing with the timer. pls tell what is missing in the code i have shrd above
That is why i am now asking you how can i use the random timer.
Do not call the timer logic from the timer handler itself.
You should call that from your main thread.
Kind regards,
Håkon
can u pls change that i my shred code ,i am realyy finding it bit difficult
Hakon it will be very much kind of you if you will assist at earliest.