Felix HARERIMANA / Mbed 2 deprecated STEP2

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
harerimana
Date:
Sun Nov 01 13:34:58 2020 +0000
Parent:
5:e1afaceb1196
Commit message:
If YELLOW LIGHT switch back to ON, then switch OFF the RED light

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Sun Nov 01 13:30:39 2020 +0000
+++ b/main.cpp	Sun Nov 01 13:34:58 2020 +0000
@@ -20,8 +20,8 @@
              trafficRedlight=1; // set trafficReslight on
              }
              if(!trafficYellowlight){
-              trafficYellowlight=!pedestrainButton; // yellow and red lights are switched opposetely
-                 
+                 trafficYellowlight=!pedestrainButton; // yellow and red lights are switched opposetely
+                 trafficRedlight=!trafficYellowlight; // yellow and red lights are switched opposetely
              }
         
              wait_ms(5000); // wait for 5 second