RGB

Dependencies:   mbed

Fork of RGB-15 by Ladner-Praja

Revision:
5:e968c184ad9f
Parent:
4:0c35562c35a4
Child:
6:210eb76618cc
diff -r 0c35562c35a4 -r e968c184ad9f main.cpp
--- a/main.cpp	Tue Jul 07 21:03:25 2015 +0000
+++ b/main.cpp	Tue Jul 07 21:08:19 2015 +0000
@@ -84,11 +84,21 @@
         else
         {
             if(waiting<7)
+            {
+                wait(0.5);
+                if(waiting==0)
+                {
+                    enable = 0;
+                    online = 0;
+                    myrgb=7;
+                }
                 waiting++;
+            }
             else
             {
                 enable = 1;
                 online = 1;
+                wait(0.5);
                 if(myline<15||linecenter<1)
                 {
                     active=1;
@@ -98,11 +108,7 @@
                     myrgb=4;
                 waiting=0;
             }
-            wait(0.5);
             myled=out_helper[waiting];
-            enable = 0;
-            online = 0;
-            myrgb=7;
         }
         //0=>keine Linie