This is my first 'from scratch' arduino project & first time using Frizting so would appreciate any feedback. I've commented all of the code so it should be pretty self-explanatory once you're in it to see where to adjust what. Automated: Automates the switching sequence when the push button is held. Pretty simple - attach the components as indicated in the Fritzing diagrams & load the code up in Arduino. A Stateflow chart is used to create state machines for the automated and manual mode. (The POT is optional if you choose to fix the light cycle rate) Instructions Code is provided to adjust how long it waits (as a % of cycle rate)ĥ LEDs (1 each of Red, Yellow, Green, Organge & White) Pressing the push button at any point will trigger a walk light on the NEXT green signal.įlashing Wait on Green: The system will also start to flash the wait light part way through the green. Push Button Walk Request: Default operation is for the the Wait Signal to remain lit during a green light. Short Cycle Yellow: Code is also included to adjust the yellow cycle independently of the Red & Green (as a % of cycle rate) In the maintenance sequence the lights will always blink yellow if the button is low and then if the button is HIGH it will return with the value 1, if the value is 1 in that if statement, then it will return to the void loop. Variable Light Cycle: Using the pot you can adjust the frequency of how fast the lights change This project is fairly easy to assemble - most effort went into scripting rather than laying out the prototype.
0 Comments
Leave a Reply. |