60 likes | 189 Views
This exercise involves creating a finite state machine (FSM) for a cabin temperature control system in a vehicle. It includes implementing a debounce FSM to manage lock and unlock states. The system will utilize three LEDs (green, red, blue) to indicate the control status based on temperature thresholds (TempHigh, TempNormalHigh, TempNormalLow, TempLow). At reset, all systems, including the heating and air conditioning, will be off. Based on temperature readings, the correct LED will illuminate and the relevant systems will be activated or deactivated accordingly.
E N D
Debounce • Fill the table according the FSM for debounce
Lock - Unlock • Codify the next SM in C:
Cabin temperature • Make the state machine for the next feature: The feature controls temperature in the cabin of a vehicle. There are three LEDs which indicate the control state of the temperature system: a LED green, a LED red and a LED blue. At Reset, all the LEDs, the heating system and the air conditioner system are turned off. When the temperature is great than TempHigh, the air conditioner system and only the LED red are turned on. If the temperature is less than TempLow the heating system and only the LED blue are turned on. If the temperature is less than TempNormalHigh and great than TempNormalLow, heating system or air conditioner system are turned off and only the LED green is turned on. Take in count that: TempHigh > TempNormalHigh > TempNormalLow > TempLow