Button pressed == Led on

Dependencies:   Bertl mbed

Files at this revision

API Documentation at this revision

Comitter:
niclasesterl
Date:
Mon Nov 30 14:22:07 2015 +0000
Commit message:
Button pressed == LED ON

Changed in this revision

Bertl.lib Show annotated file Show diff for this revision Revisions of this file
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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Bertl.lib	Mon Nov 30 14:22:07 2015 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/teams/Bertl_Team_PE/code/Bertl/#43d6a7e6e64a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Nov 30 14:22:07 2015 +0000
@@ -0,0 +1,60 @@
+#include "mbed.h"
+#include "const.h"
+#include "Robot.h"
+Robot bertl;
+
+int main()
+{
+    
+    while(1)
+    {
+        if (bertl.IsButtonPressed(BTN_BL))
+        {
+            bertl.TurnLedOn(LED_BL1);
+            bertl.TurnLedOn(LED_BL2);
+            }
+                                
+        
+          if (bertl.IsButtonPressed(BTN_BR))
+        {
+            bertl.TurnLedOn(LED_BR1);
+            bertl.TurnLedOn(LED_BR2);
+            }
+                                
+        
+          if (bertl.IsButtonPressed(BTN_FLL))
+        {
+            bertl.TurnLedOn(LED_FL1);
+           
+            }
+       
+          if (bertl.IsButtonPressed(BTN_FL))
+        {
+           
+            bertl.TurnLedOn(LED_FL2);
+            }
+              
+          if (bertl.IsButtonPressed(BTN_FRR))
+        {
+            bertl.TurnLedOn(LED_FR1);
+           
+            }
+                                
+        
+          if (bertl.IsButtonPressed(BTN_FR))
+        {
+          
+            bertl.TurnLedOn(LED_FR2);
+            }
+                                
+        
+          if (bertl.IsButtonPressed(BTN_BM) )
+        {
+            bertl.TurnLedOff(LED_ALL);
+            }
+                                
+        }
+        
+        
+    
+    }
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Nov 30 14:22:07 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/165afa46840b
\ No newline at end of file