Arduino: a full traffic light with pedestrian button
Build a traffic light with a pedestrian crossing button using a proper state machine. The project that teaches event timing without delay().
Tag
5 tutorials
Build a traffic light with a pedestrian crossing button using a proper state machine. The project that teaches event timing without delay().
Build the Simon memory game with 4 buttons, 4 LEDs, and a buzzer. State machines, tone(), and the game loop that scales to any difficulty.
Read a 4x4 keypad with 8 Arduino pins instead of 16 by scanning rows and columns. The matrix-scan trick behind every keyboard ever made.
Roll a die with a button press: a 7-segment display shows 1 to 6 with a tumble animation. Direct-drive wiring, a segment map, and honest randomness on the Uno.
Wire a button to an ESP32 and write the debounce code that keeps your state from flickering. Includes the pattern I use in every project.