Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
- Committer:
- alejandroforero
- Date:
- 2015-12-10
- Revision:
- 0:fd8b7f396f9c
File content as of revision 0:fd8b7f396f9c:
#include "mbed.h" /* view a PWM in an output with increment and decrement. anode led connected to PWM pin (8-J1 or PTA1 or D3 are equal) and cathode to ground (pin 14-J2) with 330ohms resistor. */ PwmOut led (D3); float value =0; int main(){ while (true) { for(value=0.0;value<=1.0;value+=0.02){ led.write(value); wait(0.02); } for(value=1.0;value>=0.0;value-=0.02){ led = value; wait(0.02); } } }