Felix HARERIMANA / Mbed 2 deprecated DISCO_F413ZH-trafficproject-SOUND

Dependencies:   mbed

Revision:
6:14626bbcb236
Parent:
5:e1afaceb1196
Child:
7:667534ecd34e
--- 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