Colin Hogben
/
pwm_regression
Demonstrate that PwmOut no longer works on FRDM-K64F with revision 120 of mbed
Diff: main.cpp
- Revision:
- 0:755478a682b2
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu May 12 08:03:48 2016 +0000 @@ -0,0 +1,17 @@ +// On FRDM-K64F, connect LED+330R between PTD0 (J2.6) and GND (J2.3) +// With revision 119 of mbed, LED is lit as expected. +// With revision 120 of mbed, the LED is not lit. +#include "mbed.h" + +int main() { + PwmOut p(PTD0); + while (1) { + int i; + for (i=0; i <=10; i++) { + p.write((float)i / 10); + wait_ms(500); + } + } + return 0; +} + \ No newline at end of file