Question 1:
Design an embedded system (write python code, make
hardware diagram, and interface using tkgpio library) to
control a DC and a servo motor accordingly:
• In State S0, all motors are off
• We leave S0 to S1 on the press of a start pushbutton.
• In State S1, DC motor is clockwise at 50% duty cycle,
LED1 is ON, LED 2, and 3 are off.
• We stay in S1 for 5 seconds before going to S2.
• In S2, we move the servo motor to the 90 degree angle,
turn LED 2 ON, others LEDs are off.
• We leave S2 when a push button is pressed. We go to S3.
• In S3, we do face detection, if face is detected turn LED 3
ON, other LEDs are off.
• We move from S3 back to S0 when the arrow key is
pressed.