Test of ifs and else

Dependencies:   mbed

Revision:
0:05b24581db56
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Apr 16 11:46:58 2015 +0000
@@ -0,0 +1,25 @@
+#include "mbed.h"
+#include "ur_Bertl.h"
+#include "const.h"
+
+int main(){
+
+    ur_Bertl tom;                           //So sprich ich ihn an
+
+    tom.Move();                             //Er fährt
+   
+    while(1)                                //Endlosschleife
+    {
+    if(tom.IsButtonPressed(BTN_FLL)){       //Bedingung für den Button
+        tom.NibbleLeds(0x0A);               //Anweisung zum einschalten des Lichts
+    }
+    else{
+    tom.NibbleLeds(0x00);                    //Wenn er nicht gepresst ist schalte die Lichter aus
+    }
+    
+    if (tom.IsButtonPressed(BTN_FM)){       //Bedingung
+        tom.TurnLeft();                     //Anweisung
+        tom.Move(); 
+    }
+   } 
+}
\ No newline at end of file