Mirembe Jean d'Amour / Mbed 2 deprecated ASSIGNMENT_PART4

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
titig
Date:
Sun Nov 01 12:21:50 2020 +0000
Parent:
2:a98660025857
Commit message:
Once YELLOW light is switched OFF, when the button is switched OFF again, make the YELLOW light ON;

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Sun Nov 01 12:09:22 2020 +0000
+++ b/main.cpp	Sun Nov 01 12:21:50 2020 +0000
@@ -16,7 +16,7 @@
             trafficYellowlight=0;  //switch off yellow light
              }
              if(!trafficYellowlight){
-                 trafficYellowlight=!pedestrainButton;  // Yellow light reamin switched OFF
+                 trafficYellowlight=!pedestrainButton;  // Yellow light reamin switched OFF but once button is pressed to be OFF Yellow light will be ON
              }
         
              wait_ms(500);