- October 27, 2018 at 11:19 am #3974
I want to do something like this in the dev mode:
1. Give 1200 throttle for 5 seconds
2. After that, give 1500 throttle for next 5 seconds
3. Then stop it by giving throllte 1000.
Is there any way to achive it?
The following code is not working:
- November 8, 2018 at 2:27 pm #3984
delay_ms(5000) is a blocking function. In order to execute this code properly, you need to use a non-blocking function. I will upload the code here in a couple of hours.
- March 7, 2019 at 5:39 pm #4124
hello…What do you mean by efficient?A 1ms delay is 1ms.
Any software delay is a blocking delay, i.e. the code blocks the CPU from executing any other instructions.
If you want tighter code, you can use
But that means that wait must be increased for the same time delay.
You must be logged in to reply to this topic.