BertlIfElse

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
GreenOrange
Date:
Fri Apr 24 08:18:09 2015 +0000
Commit message:
IfElse

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
ur_Bertl.lib Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 49a27b366dba main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Apr 24 08:18:09 2015 +0000
@@ -0,0 +1,40 @@
+#include "mbed.h"
+#include "ur_Bertl.h"
+#include "const.h"
+
+int main() 
+{
+    ur_Bertl karel;
+    while(1) 
+    {
+        
+        if (!karel.IsButtonPressed(BTN_FRR))
+             karel.NibbleLeds(0x0F);   
+        else
+            karel.NibbleLeds(0x40);
+        
+        
+        if (!karel.IsButtonPressed(BTN_FR))
+            karel.NibbleLeds(0x0F); 
+        else
+            karel.NibbleLeds(0x08);
+        
+        
+        if (!karel.IsButtonPressed(BTN_FM))
+            karel.NibbleLeds(0x0F); 
+        else
+            karel.NibbleLeds(0x01);
+        
+        
+        if (!karel.IsButtonPressed(BTN_FL))
+            karel.NibbleLeds(0x0F); 
+        else
+            karel.NibbleLeds(0x04);
+            
+            
+        if (!karel.IsButtonPressed(BTN_FLL))
+            karel.NibbleLeds(0x0F); 
+        else
+            karel.NibbleLeds(0x80);
+    }
+}
diff -r 000000000000 -r 49a27b366dba mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Apr 24 08:18:09 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/487b796308b0
\ No newline at end of file
diff -r 000000000000 -r 49a27b366dba ur_Bertl.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ur_Bertl.lib	Fri Apr 24 08:18:09 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/teams/BULME_BERTL_2CHEL/code/ur_Bertl/#66e9a0afcbd6