I am developing a code and I want to active a "controler" for see the value of one variable in a period of time.
Right now I do this:
The inyect repeat every second and in the function I check the value of the variable.
I think this may overload my microo and I would like to be able to stop the inject when the variable changes value.
any recommendations on how I can do this in a better way? I am new in node-red.
Not likely - that is a very basic and small task for node-red.
Can you not use the part of your flow that updates this variable - with an RBE node to detect changes instead of polling it every 1 second?
As a new user, I recommend watching this playlist: Node-RED Essentials. The videos are done by the developers of node-red. They're nice & short and to the point. You will understand a whole lot more in about 1 hour. A small investment for a lot of gain.