LEDs gehen an wenn Taster gedrückt

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
mSeiser
Date:
Fri Apr 24 08:42:20 2015 +0000
Commit message:
Vorder und R?cklicht wie beim Auto

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 bb5edc977ef2 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Apr 24 08:42:20 2015 +0000
@@ -0,0 +1,32 @@
+#include "mbed.h"
+#include "ur_Bertl.h"
+#include "const.h"
+
+
+
+
+int main()
+{
+    
+    ur_Bertl karel;
+    
+    while(1)
+    {
+        if(karel.IsButtonPressed(BTN_FLL))          //linker Button vorne außen
+            karel.TurnLedOn(0x01);
+        if(karel.IsButtonPressed(BTN_FRR))          //rechter Button vorne außen
+            karel.TurnLedOn(0x04);
+        if(karel.IsButtonPressed(BTN_FRR)&&karel.IsButtonPressed(BTN_FLL))
+            karel.TurnLedOn(0x0F);
+        if(karel.IsButtonPressed(BTN_BR))           //linker Button hinten außen
+            karel.TurnLedOn(0x80);
+        if(karel.IsButtonPressed(BTN_BL))           //rechter Button hinten außen
+            karel.TurnLedOn(0x20);
+        if(karel.IsButtonPressed(BTN_BR)&&(karel.IsButtonPressed(BTN_BL))) 
+            karel.TurnLedOn(0xF0); 
+    }
+    
+    
+}  
+    
+
diff -r 000000000000 -r bb5edc977ef2 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Apr 24 08:42:20 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/433970e64889
\ No newline at end of file
diff -r 000000000000 -r bb5edc977ef2 ur_Bertl.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ur_Bertl.lib	Fri Apr 24 08:42:20 2015 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/teams/BERTL_CHEL_18/code/ur_Bertl/#207a1e646191