k

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
TFuchsbichler
Date:
Mon Sep 28 13:42:05 2015 +0000
Commit message:
lk

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
diff -r 000000000000 -r f32d17a9423d main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Sep 28 13:42:05 2015 +0000
@@ -0,0 +1,69 @@
+#include "mbed.h"
+
+BusOut RGB(p23,p24,p25);
+BusOut led(LED4,LED3,LED2,LED1);
+
+void red()
+{
+    RGB=6;
+}
+
+void green()
+{
+    RGB=5;
+}
+
+void yellow()
+{
+    RGB=4;
+}
+
+void black()
+{
+    RGB=7;    
+}
+
+
+
+
+int main() {
+   for(int i=1;i<=5;i++)
+    {
+        yellow();
+        led=2;
+        wait_ms(250);
+        black();
+        led=0;
+        wait_ms(250);
+        
+        
+    }
+    
+    while(1) 
+    {
+        red();
+        led=4;
+        wait_ms(10000);
+        yellow();
+        led=6;
+        wait_ms(3000);
+        green();
+        led=1;
+        wait_ms(8000);
+        
+        for(int i=1;i<=2;i++)
+        {
+            green();
+            led=1;
+            wait_ms(250);
+            black();
+            led=0;
+            wait_ms(250);
+        }
+        
+        yellow();
+        led=2;
+        wait_ms(4000);
+       
+    }
+}
diff -r 000000000000 -r f32d17a9423d mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Sep 28 13:42:05 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/4f6c30876dfa
\ No newline at end of file