Martina Le / Mbed 2 deprecated Bertl_Button

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
martinale
Date:
Thu Apr 16 11:38:57 2015 +0000
Commit message:
4 LEDs zeigen welcher Taster gedr?ckt wird :)

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_Bertl02.lib Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Apr 16 11:38:57 2015 +0000
@@ -0,0 +1,39 @@
+#include "mbed.h"
+#include "ur_Bertl.h"
+#include "const.h"
+
+int main()
+{
+    ur_Bertl karel;
+
+    karel.TurnLedOff(LED_ALL);
+
+    while(1) {
+        if( karel.IsButtonPressed(BTN_FLL))
+            karel.NibbleLeds(0x01);
+
+        if( karel.IsButtonPressed(BTN_FL))
+            karel.NibbleLeds(0x02);
+
+        if( karel.IsButtonPressed(BTN_FM))
+            karel.NibbleLeds(0x0F);
+
+        if( karel.IsButtonPressed(BTN_FR))
+            karel.NibbleLeds(0x04);
+
+        if( karel.IsButtonPressed(BTN_FRR))
+            karel.NibbleLeds(0x08);
+
+        if( karel.IsButtonPressed(BTN_BL))
+            karel.NibbleLeds(0x0E);
+
+        if( karel.IsButtonPressed(BTN_BM))
+            karel.NibbleLeds(0x09);
+            
+        if( karel.IsButtonPressed(BTN_BR))
+            karel.NibbleLeds(0x07);
+            
+        else
+            karel.NibbleLeds(0x00);
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Apr 16 11:38:57 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/487b796308b0
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ur_Bertl02.lib	Thu Apr 16 11:38:57 2015 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/teams/BERTL_CHEL_18/code/ur_Bertl/#6b667e2cb800