Show HN: Arduino traffic light(table-driven design)(resorte.neocities.org)
resorte.neocities.org
Show HN: Arduino traffic light(table-driven design)
https://resorte.neocities.org/arduinoEng
1 comments
Why refactor the code?: less repetition, clearer intent, easier to change timing/logic by editing a table instead of code paths.
Feedback welcome—especially ideas to extend it.
(This post is part of Resorte, a Spanish magazine (comics, hobbies, technical notes) inspired by Argentina’s legendary Lúpin. If you read Spanish, check it out.)
Feedback welcome—especially ideas to extend it.
(This post is part of Resorte, a Spanish magazine (comics, hobbies, technical notes) inspired by Argentina’s legendary Lúpin. If you read Spanish, check it out.)
I refactored it by using arrays and small, modular functions, so it’s easier to read, modify, and extend.