Answer the question
In order to leave comments, you need to log in
Node Red. traffic light model. Switch button how?
Hello! I found a tutorial on the Internet on how to create a simple traffic light using Node-Red for Raspberry PI.
Here it is: https://youtu.be/bkJuzFdnLUg
This is how my scheme looks like:
The functions Red, Red & Yellow, Green, Yellow contain Json values that are passed to the output, respectively:
msg.payload = {"red": 1, "yellow": 0, "green": 0};
msg.payload = {"red": 1, "yellow": 1, "green": 0};
msg.payload = {"red": 0, "yellow": 0, "green": 1};
msg.payload = {"red": 0, "yellow": 1, "green": 0};
And in general, everything worked out, but now the task is to make 1 button for switching colors. Those. to reset the delay
Red + yellow => Green
Green => Yellow
Yellow
=> Red
conditions for switching would be made. But nothing happened. I'm new to this software, so please help!
Thank you!
https://pantydev.s-ul.eu/KAvlO2qy here is the export flow
Answer the question
In order to leave comments, you need to log in
No more, thanks to everyone who replied!
Json values began to be passed through global.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question