5. Aufgabe mit dem Bertl

Dependencies:   Bertl mbed

Files at this revision

API Documentation at this revision

Comitter:
Joci1221
Date:
Mon Nov 30 14:24:45 2015 +0000
Commit message:
Bertl Aufgabe 5

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
diff -r 000000000000 -r 83796a4f431d Bertl.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Bertl.lib	Mon Nov 30 14:24:45 2015 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/users/fpucher/code/Bertl/#308802267a62
diff -r 000000000000 -r 83796a4f431d main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Nov 30 14:24:45 2015 +0000
@@ -0,0 +1,98 @@
+#include "mbed.h"
+#include "Robot.h"
+#include "const.h"
+
+DigitalOut myled(LED1);
+Robot bertl;
+int main() 
+{
+    bertl.RGBLed(0
+    , 0, 0);
+    while(1)
+    {
+        bertl.TurnLedOn(LED_FR1);
+        while (bertl.WaitUntilButtonPressed())
+        {
+            wait(0.05);
+        }
+        bertl.TurnLedOff(LED_FR1);
+    
+        bertl.TurnLedOn(LED_FR2);
+        while (bertl.WaitUntilButtonPressed())
+        {
+            wait(0.05);
+        }
+        bertl.TurnLedOff(LED_FR2);
+    
+        bertl.TurnLedOn(LED_BR2);
+        while (bertl.WaitUntilButtonPressed())
+        {
+            wait(0.05);
+        }
+        bertl.TurnLedOff(LED_BR2);
+    
+        bertl.TurnLedOn(LED_BR1);
+        while (bertl.WaitUntilButtonPressed())
+        {
+            wait(0.05);
+        }
+        bertl.TurnLedOff(LED_BR1);
+    
+        bertl.NibbleLeds(0x08);
+        while (bertl.WaitUntilButtonPressed())
+        {
+            wait(0.05);
+        }
+        wait(0.2);
+        bertl.NibbleLeds(0x04);
+        while (bertl.WaitUntilButtonPressed())
+        {
+            wait(0.05);
+        }
+        wait(0.2);
+        bertl.NibbleLeds(0x02);
+        while (bertl.WaitUntilButtonPressed())
+        {
+            wait(0.05);
+        }
+        wait(0.2);
+        bertl.NibbleLeds(0x01);
+        while (bertl.WaitUntilButtonPressed())
+        {
+            wait(0.05);
+        }
+        wait(0.2);
+        bertl.NibbleLeds(0x00);
+        while (bertl.WaitUntilButtonPressed())
+        {
+            wait(0.05);
+        }
+        bertl.TurnLedOn(LED_BL2);
+        while (bertl.WaitUntilButtonPressed()) 
+        {
+            wait(0.05);
+        }
+        bertl.TurnLedOff(LED_BL2);
+    
+        bertl.TurnLedOn(LED_BL1);
+        while (bertl.WaitUntilButtonPressed())
+        {
+            wait(0.05);
+        }
+        bertl.TurnLedOff(LED_BL1);
+    
+        bertl.TurnLedOn(LED_FL2);
+        while (bertl.WaitUntilButtonPressed())
+        {
+            wait(0.05);
+        }
+        bertl.TurnLedOff(LED_FL2);
+    
+        bertl.TurnLedOn(LED_FL1);
+        while (bertl.WaitUntilButtonPressed())
+        {
+            wait(0.05);
+        }
+        bertl.TurnLedOff(LED_FL1);
+    }
+}
diff -r 000000000000 -r 83796a4f431d mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Nov 30 14:24:45 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/9296ab0bfc11
\ No newline at end of file