I am relatively new to Arduino and electronics, so whatever I state here, is what I think is happening in the code. If I am incorrect please correct me and/or explain the proper code or statement corrections. Thank you.
This sketch is for a simplified USA Traffic Light System. It uses just 5 led’s, 3 for traffic red, green, yellow, and 2 for Pedestrian crossing red and green. I did not write this sketch from scratch. I googled and used arduino forums to find code and alter it to my needs. I give credit where credit is due.
I wanted to use an array of buttons. This sketch uses arrays and sizeof() function to dynamically change the size of the array as you add or subtract buttons, nice.
It uses state machine - debounce and millis too.
Thank you for any constructive comments. HTH