HI
The SDK is "nRF5_SDK_for_Thread_and_Zigbee_v4.1.0" and I find a question that is: for all thread programs, add nrf_ delay_ ms () function in while (true) will affect the operation delay of the key, what's the matter?
thanks!
HI
The SDK is "nRF5_SDK_for_Thread_and_Zigbee_v4.1.0" and I find a question that is: for all thread programs, add nrf_ delay_ ms () function in while (true) will affect the operation delay of the key, what's the matter?
thanks!
Hi
Thank you very much for being so patient with my question,what I mean is if you add a delay in main loop ,the button must be long push will work , and if you add not fixed delay in main loop just like code segment ( it is not fixed delay) and the button will be not work. I want to konw why? I can assure you that this problem is not caused by my code modification, but by itself,because I just add " nrf_delay_ms(1000); "
thanks !
Thank you for the explanation, I think I understand now, the button stops working when adding this delay, right? Is there a reason you're trying to add this delay to your main loop?
What example project are you adding this delay in. If you let me know I'll try to reproduce this on my end as well.
Best regards,
Simon
Right.Yes,I have a reaseon ,but the most important is I want to know why?
The SDK is "nRF5_SDK_for_Thread_and_Zigbee_v4.1.0" and the example is "examples/thread/simple_coap_client".This is ont only the example like this ,but also other examples in the SDK are the same.
thanks!
Hi
Okay, adding the nrf_delay_ms(1000); there will cause all actions within this while loop to be delayed by 1 second, so when you've added this delay, you will need to hold the button down for a little over a second, as it delays all operation by 1 second, and will not register the button as pressed unless it is pressed inbetween the delays.
Depending on where you want this delay to have effect, you will need to move where the delay is triggered.
Best regards,
Simon
thanks ,but don't pressing this action interrupt? Why wait for this second?
thanks!