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

Dependencies:   mbed

Fork of LAB4_RGpwmout by Akashlal Bathe

Files at this revision

API Documentation at this revision

Comitter:
akashlal
Date:
Tue Jun 28 08:25:40 2016 +0000
Commit message:
First edition

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /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);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Jun 28 08:25:40 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/6c34061e7c34
\ No newline at end of file