DK
daniel koop
Traffic Light Controller - Copy this React, Tailwind Component to your project
In this lab, we will design a simple state machine that imitates a traffic light. The state machine should do the following: 1. Start in the “green” state. 2. Once switch S1 is pressed (or switched) the state machine should transition to the “yellow” state for 1 clock cycle. 3. After 1 clock cycle, the state machine should transition to the “red” state and stay there until switch S1 is pressed (or switched). 4. From the “red” state, after S1 is pressed, the state should transition to the “green” state.
Prompt
