Page 37 - ARM Based Microcontroller Projects Using MBED
P. 37

2.5 EXERCISES                              23
            12. Draw the flow chart equivalent of the following PDL:
                        BEGIN
                             Wait for switch to be pressed
                             Turn ON the buzzer
                             Wait 5 seconds
                             Turn OFF buzzer
                             Wait until switch is released
                        END
            13. Draw the flow chart equivalent of the following PDL:
                        BEGIN
                             DO FOREVER
                                    IF motor is ON THEN
                                         Turn ON pump
                                         Wait for 5 seconds
                                    ELSE
                                         Turn ON alarm
                                         Wait for 10 seconds
                                         Turn OFF alarm
                                    ENDIF
                             ENDDO
                        END
   32   33   34   35   36   37   38   39   40   41   42