increase led brightness using pwmout

Dependencies:   mbed

Revision:
0:72b44fd432ea
Child:
1:bb80a98933ca
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Sep 26 09:33:24 2016 +0000
@@ -0,0 +1,19 @@
+#include "mbed.h"
+
+PwmOut led(D3);
+
+Serial pc(USBTX, USBRX);
+
+int main()
+{
+    
+    pc.baud(115200);
+    while (true) {
+        
+        for (float f = 0.0; f < 1.0; f += 0.1f) {
+            led.write(f);
+            wait(0.5f);  
+        }        
+          
+    }
+}
\ No newline at end of file