Blinker

Dependencies:   TextLCD mbed MMA8451Q

Revision:
14:38a4ae533a01
Parent:
13:243a94718e51
Child:
15:af1df0baba62
--- a/Blinker.cpp	Fri Jun 27 07:01:46 2014 +0000
+++ b/Blinker.cpp	Fri Jun 27 07:07:52 2014 +0000
@@ -39,8 +39,6 @@
     myLED_G= 1;
     myLED_R= 1;
     
-    Blinker_L_Led=1;
-    
     lcd.cls();
     lcd.locate(4,1);
     lcd.printf("smartBIG");
@@ -77,6 +75,7 @@
     wait(z);
     lcd.locate(0,0);
     lcd.printf("<--");
+    Blinker_L_Led = 1;
     buttonState = read_KEY();
     wait(z);
     
@@ -88,7 +87,7 @@
                 wait(0.05);
                 if (buttonState == DOWN_KEY)        // Abbruchbedingung Dauerblinker
                 { Programmwahl();}*/
-                
+                Blinker_L_Led = 0;
                 buttonState = NO_KEY;
                 lcd.cls();
                 lcd.locate(2,1);
@@ -96,11 +95,15 @@
                 wait(z);
                 lcd.locate(0,0);
                 lcd.printf("<--");
+                Blinker_L_Led = 1;
                 buttonState = read_KEY();
                 wait(z);
                 
                 if (buttonState == DOWN_KEY)        // Abbruchbedingung Dauerblinker
-                { Programmwahl();}
+                {
+                Blinker_L_Led = 0;     
+                Programmwahl();
+                }
                 //if (buttonState == UP_KEY)        // Einstieg Warnblinker
                 //{ BlinkerW();}
             }   
@@ -110,14 +113,16 @@
             char x = 3;
             for (x=3; x>=1; x--)
             {
+                Blinker_L_Led = 0;
                 lcd.cls();
                 lcd.locate(1,1);
                 lcd.printf("Komfortblinker");
                 wait(z);
                 lcd.locate(15,0);
-                lcd.printf("%d%",x);
+                lcd.printf("%d",x);
                 lcd.locate(0,0);
                 lcd.printf("<--");
+                Blinker_L_Led = 1;
                 wait(z);
             }
             }