Productivity device

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
lionello
Date:
Sun Nov 02 13:49:04 2014 +0000
Commit message:
Added PWM for RGB LED;

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 fa963d2df743 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sun Nov 02 13:49:04 2014 +0000
@@ -0,0 +1,20 @@
+#include "mbed.h"
+
+DigitalOut ledRed(LED1);
+PwmOut ledRgbRed(P0_30);
+PwmOut ledRgbGreen(P0_28);
+PwmOut ledRgbBlue(P0_26);
+
+int main() {
+    ledRgbRed = 0.2;
+    ledRgbGreen = 0.5;
+    ledRgbBlue = 1.0;
+
+    while(1) {
+
+        ledRed = 1;
+        wait(0.2);
+        ledRed = 0;
+        wait(0.2);
+    }
+}
diff -r 000000000000 -r fa963d2df743 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sun Nov 02 13:49:04 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/031413cf7a89
\ No newline at end of file