RGB color LCD Test (PWM) for BlackOne
Revision 0:a22b8f104ce3, committed 2012-03-10
- Comitter:
- techand
- Date:
- Sat Mar 10 11:09:18 2012 +0000
- Commit message:
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 |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Sat Mar 10 11:09:18 2012 +0000
@@ -0,0 +1,26 @@
+#include "mbed.h"
+
+//DigitalOut myled(LED1);
+PwmOut blue(p24);
+PwmOut green(p25);
+PwmOut red(p26);
+
+int main() {
+ while(1) {
+ for(float p = 0.0f; p < 1.0f; p += 0.05f) {
+ blue = p;
+ green = 1 - p;
+ wait(0.04);
+ }
+ for(float p = 0.0f; p < 1.0f; p += 0.05f) {
+ red = p;
+ blue = 1 - p;
+ wait(0.04);
+ }
+ for(float p = 0.0f; p < 1.0f; p += 0.05f) {
+ green = p;
+ red = 1 - p;
+ wait(0.04);
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sat Mar 10 11:09:18 2012 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/4c0c40fd0593