Hello world example project for RGB-fun library

Dependencies:   RGB-fun mbed

Files at this revision

API Documentation at this revision

Comitter:
sillevl
Date:
Thu Dec 10 09:58:33 2015 +0000
Commit message:
hello world example for rgb fun library

Changed in this revision

RGB-fun.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 fe719ffe59b7 RGB-fun.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/RGB-fun.lib	Thu Dec 10 09:58:33 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/sillevl/code/RGB-fun/#d10cfeb2f18e
diff -r 000000000000 -r fe719ffe59b7 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Dec 10 09:58:33 2015 +0000
@@ -0,0 +1,22 @@
+#include "mbed.h"
+#include "RGB.h"
+
+RGB led(p23,p24,p25);
+
+int main()
+{
+    led.off();
+
+    wait(1.0);
+
+    // setting the color using the Color enum with named colors
+    led.setColor(Color::RED);
+
+    // setting the color using a hexadecimal notated integer (yellow)
+    led.setColor(0xFFFF00);
+
+    // setting the color using an instance of the Color class
+    Color* myColor = new Color(0,255,0);
+    led.setColor(myColor);
+    delete myColor;
+}
\ No newline at end of file
diff -r 000000000000 -r fe719ffe59b7 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Dec 10 09:58:33 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/165afa46840b
\ No newline at end of file