First LED Test

Dependencies:   Bertl mbed

Files at this revision

API Documentation at this revision

Comitter:
niclasesterl
Date:
Mon Nov 16 14:35:47 2015 +0000
Commit message:
First Led Test

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 16 14:35:47 2015 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/users/fpucher/code/Bertl/#308802267a62
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Nov 16 14:35:47 2015 +0000
@@ -0,0 +1,58 @@
+
+#include "mbed.h"
+#include "const.h"
+#include "Robot.h"
+
+Robot bertl;
+    
+int main()
+{
+  int x = 0.1;
+   while(1)
+   {
+       bertl.NibbleLeds(0x0F);
+       wait(x);
+       bertl.NibbleLeds(0x00);
+       wait(x);
+       bertl.TurnLedOn(LED_BL2);
+       wait(x);
+       bertl.TurnLedOff(LED_BL2);
+        wait(x);
+       bertl.TurnLedOn(LED_BL1);
+       wait(x);
+       bertl.TurnLedOff(LED_BL1);
+        wait(x);
+       bertl.TurnLedOn(LED_FL2);
+       wait(x);
+       bertl.TurnLedOff(LED_FL2);
+       wait(x);
+       bertl.TurnLedOn(LED_FL1);
+       wait(x);
+       bertl.TurnLedOff(LED_FL1);
+       wait(x);
+       bertl.TurnLedOn(LED_FR1);
+       wait(x);
+       bertl.TurnLedOff(LED_FR1);
+       wait(x);
+       bertl.TurnLedOn(LED_FR2);
+       wait(x);
+       bertl.TurnLedOff(LED_FR2);
+       wait(x);
+       bertl.TurnLedOn(LED_BR1);
+       wait(x);
+       bertl.TurnLedOff(LED_BR1);
+             wait(x);
+       bertl.TurnLedOn(LED_BR2);
+       wait(x);
+       bertl.TurnLedOff(LED_BR2);
+       wait(x);
+       
+       bertl.RGBLed(1,0,0);
+       wait(x);
+       bertl.RGBLed(0,1,0);
+       wait(x);
+       bertl.RGBLed(0,0,1);
+       wait(x);
+       bertl.RGBLed(0,0,0);
+       }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Nov 16 14:35:47 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/9296ab0bfc11
\ No newline at end of file