FROM : Nucleo_LED_PWM_Pulsing Program pulses the board LED from 0% to 100% and back using soft PWM. Tested on Nucleo F030R8 and modified for the 2 LED's of the Ezsbc2

Dependencies:   mbed

Fork of Nucleo_LED_PWM_Pulsing by Tomasz Rodziewicz

Files at this revision

API Documentation at this revision

Comitter:
kizosgr
Date:
Sat Apr 18 21:21:35 2015 +0000
Parent:
0:ee3ee6288b15
Commit message:
from : Nucleo_LED_PWM_Pulsing

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 ee3ee6288b15 -r dc129d9a7e26 main.cpp
--- a/main.cpp	Tue May 27 16:54:20 2014 +0000
+++ b/main.cpp	Sat Apr 18 21:21:35 2015 +0000
@@ -5,15 +5,19 @@
 #define LED_ON      1
 #define LED_OFF     0
 
-DigitalOut myled(LED1);
+DigitalOut myled(p27);
+DigitalOut myled1(p28);
+
 
 void blink_led(int from, int to) 
 {
     for (int i = 0; i < PWM_STEPS; i++) { 
         myled = from;
+        myled1 = from;
         wait_us(i * PWM_SPEED);
         
         myled = to;
+        myled1 = to;
         wait_us((PWM_STEPS - i) * PWM_SPEED);
     }
 }
diff -r ee3ee6288b15 -r dc129d9a7e26 mbed.bld
--- a/mbed.bld	Tue May 27 16:54:20 2014 +0000
+++ b/mbed.bld	Sat Apr 18 21:21:35 2015 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/0b3ab51c8877
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed/builds/433970e64889
\ No newline at end of file