Question: Write a code (in C) that has a function to satisfy the state diagram below for a hand dryer. The function accepts the current state
Write a code (in C) that has a function to satisfy the state diagram below for a hand dryer. The function accepts the current state and hand detection result and returns the next state of the system. Use switch for the states and if-else-if for transition conditions.

No hand detected initial state hand detected Stop hnd detected idle run times-3 sec hand detecte Operate idle run No hand detected No hand detected
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
