increase led brightness using pwmout

Dependencies:   mbed

main.cpp

Committer:
Jankoekenpan
Date:
2016-09-26
Revision:
1:bb80a98933ca
Parent:
0:72b44fd432ea

File content as of revision 1:bb80a98933ca:

#include "mbed.h"

PwmOut led(D3);

int main()
{
    while (true) {
        
        for (float f = 0.0; f < 1.0; f += 0.1f) {
            led.write(f);
            wait(0.5f);  
        }        
          
    }
}