Coreonetech / Mbed 2 deprecated CORE-1000_RGB_LED_PWM

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
odb
Date:
Fri Feb 03 08:01:53 2017 +0000
Parent:
1:e3538c234a60
Commit message:
CORE-1000 First

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 e3538c234a60 -r b7f2b24f6dac main.cpp
--- a/main.cpp	Mon Feb 17 22:16:24 2014 +0000
+++ b/main.cpp	Fri Feb 03 08:01:53 2017 +0000
@@ -1,18 +1,30 @@
 #include "mbed.h"
 
-PwmOut mypwm(PWM_OUT);
+PwmOut mypwmR(PB_5);
+PwmOut mypwmG(PB_3);
+PwmOut mypwmB(PA_10);
 
 DigitalOut myled(LED1);
 
 int main() {
+    while(1) {    
+    mypwmR.period_ms(10);
+    mypwmR.pulsewidth_ms(5);
+    wait(1);
+    mypwmR.pulsewidth_ms(0);
     
-    mypwm.period_ms(10);
-    mypwm.pulsewidth_ms(1);
-  
-    printf("pwm set to %.2f %%\n", mypwm.read() * 100);
+    mypwmG.period_ms(10);
+    mypwmG.pulsewidth_ms(5);
+    wait(1);
+    mypwmG.pulsewidth_ms(0);
     
-    while(1) {
-        myled = !myled;
-        wait(1);
+    mypwmB.period_ms(10);
+    mypwmB.pulsewidth_ms(5);
+    wait(1);
+    mypwmB.pulsewidth_ms(0);
+    
+
+//    printf("pwm set to %.2f %%\n", mypwmB.read() * 100);
+    
     }
 }
diff -r e3538c234a60 -r b7f2b24f6dac mbed.bld
--- a/mbed.bld	Mon Feb 17 22:16:24 2014 +0000
+++ b/mbed.bld	Fri Feb 03 08:01:53 2017 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed/builds/082adc85693f
\ No newline at end of file