Arduino sketch writing for three aspect signals

Started by 1148Nick, November 24, 2019, 04:57:26 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


I am interested in using Nanos for automatically changing 3 aspect signals which would be activated by an IR obstacle avoidance sensor but I can't get a sketch to work. I would be grateful for some guidance on the matter, I basically want the green to show until the sensor is triggered then Red and after a delay yellow, then delay and green again.


post up your code,for basic operation  you need to set 3 pins as outputs and 1 as an input,show the green output until the input changes then switch green off and red on,delay a bit switch green off yellow on ,delay a bit more and yellow off loop back to the start,the correct way would be to continuously monitor the input and regardless off the output state switch to red  when the input is triggered
freedom of speech is but a dosnt exist here

Please Support Us!
July Goal: £100.00
Due Date: Jul 31
Total Receipts: £65.00
Below Goal: £35.00
Site Currency: GBP
July Donations