hi
i implemented this rules in easyesp to control a co2 valve for my aquarium
on System#Boot do
GPIO,5,0
timerSet,1,1
endon
On Rules#Timer=1 do
Pulse,5,1,40
timerSet,1,1
endon
mainly gio5 is used to activate the valve every second or less. the issue is that i checked at scope and the signal has an additional delay of 1 second. So when i put 1 in timerSet we have 2 second if i put 5 i have 6 second and so on....here is the issue in my code? is there any way to go lower than 1 second?
br
Amedeo
timer issue
Moderators: grovkillen, Stuntteam, TD-er
Re: timer issue
The timer based execution of rules may have some latency in processing.
For example if something uses a blocking call, like sending data to a server or a timeout for a network request, you may be 'late' in executing rules events.
Also we don't have a timer option operating on msec resolution.
If timing is critical, I don't think running an ESP which does also do a lot of other stuff is the best choice here.
For example maintaining the network connectivity may sometimes stall the node for an undefined amount of time, which makes true real time operations impossible.
For example if something uses a blocking call, like sending data to a server or a timeout for a network request, you may be 'late' in executing rules events.
Also we don't have a timer option operating on msec resolution.
If timing is critical, I don't think running an ESP which does also do a lot of other stuff is the best choice here.
For example maintaining the network connectivity may sometimes stall the node for an undefined amount of time, which makes true real time operations impossible.
Re: timer issue
i understand ....but what was strange that i have 1 second of latecy.....probably is due to the manager of the timer......but i really dont know.....it is not due to network hanging of something like that......instead the time of the pulse is correct and is reflecting exactly what i programmed...
br
Amedeo
br
Amedeo
Re: timer issue
What if you swap these 2 lines:
Edit:
And maybe change the "pulse" into "LongPulse_mS"
That call is non blocking.
Code: Select all
timerSet,1,1
Pulse,5,1,40
And maybe change the "pulse" into "LongPulse_mS"
That call is non blocking.
Re: timer issue
swapping the instrunctions doesnt change......
long pulse is not working in my firmware.....probably was implemented just in the last version
long pulse is not working in my firmware.....probably was implemented just in the last version
Re: timer issue
Well not really the last version... I guess it is in there for over a year now.
Re: timer issue
TD-er added a pull-request implementing a timer with milliseconds resolution, and 2 repeating (loop) timers (no need to restart after the timer fired, with seconds and milliseconds resolutions).
It can be found here: https://github.com/letscontrolit/ESPEasy/pull/3204
There are downloads available from that link for testing, and some examples as well.
It can be found here: https://github.com/letscontrolit/ESPEasy/pull/3204
There are downloads available from that link for testing, and some examples as well.
/Ton (PayPal.me)
Who is online
Users browsing this forum: No registered users and 2 guests