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.

1148Nick

 :helpneededsign:
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.

themadhippy

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  fallacy.it dosnt exist here

Please Support Us!
December Goal: £120.00
Due Date: Dec 31
Total Receipts: £90.00
Below Goal: £30.00
Site Currency: GBP
75% 
December Donations