using arduino uno
a 4 way relay
24 volt dc power supply to power the lights
a 24v to 6 v step down converter
int WHITE = 11;
int GREEN = 10;
int YELLOW = 9;
int RED = 8;
int DELAY_WHITE = 18000;
int DELAY_GREEN = 15000;
int DELAY_YELLOW = 8500;
int DELAY_RED = 15000;
// basic functions
screen sot to follow
shows error and highlighted error line
Im still learning admittedly but this is baffling me for 2 days now
any help is much appreciated
Never mind the screen shot. You can cut and past the error from the IDE window. Like this:
Arduino: 1.8.12 (Windows 10), Board: "Arduino Uno"
C:\Users\ken\Documents\Arduino\sketch_mar20a\sketch_mar20a.ino: In function 'void loop()':
sketch_mar20a:23:3: error: 'white_light' was not declared in this scope
C:\Users\ken\Documents\Arduino\sketch_mar20a\sketch_mar20a.ino:23:3: note: suggested alternative: 'red_light'
exit status 1
'white_light' was not declared in this scope
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
You never wrote any function with that name.
I'm trying to picture a traffic light with a white light.... what's that for?
Looking to the future thought OP, unless the above is literally all your system needs to do (well, once it's fixed of course) you should leave delay() behind and look to timing your lights with a millis()-based approach. If you (for instance) decide you need a pedestrian button, or some kind of vehicle sensing, or anything else that needs a response, you'll paint yourself into a corner with the delay() paradigm.
It's not as straightforward as some folk hope to take delay() out and slot millis() in. It's a good idea to design millis() in to start with, unless as I say you're 100% confident it will never be needed.