PWM se do light ka complementary brightness control karte h ye program me

Dependencies:   mbed

Fork of LAB4_RGpwmout by Akashlal Bathe

Revision:
0:c2c4d32394c3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Jun 28 08:25:40 2016 +0000
@@ -0,0 +1,24 @@
+#include "mbed.h"
+
+PwmOut led2(PTB19);
+PwmOut led1(PTB18);
+float i=0;
+
+int main() 
+{
+    while(1) 
+    {
+        for(i=1;i>0;i=i-0.1)
+        {
+            led1=i;
+            led2=1-i;
+            wait(0.1);
+        }
+        for(i=0;i<1;i=i+0.1)
+        {
+            led1=i;
+            led2=1-i;
+            wait(0.1);
+        }
+    }
+}