Shirish Deshpande / Mbed 2 deprecated RGB_led

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
Shirish
Date:
Sun Sep 30 12:57:06 2018 +0000
Commit message:
This is basic RGB Led code, Connection are RGB +ve tail is connected to 5V OR 3.3V.; ; Other 3 pins of RGB led is connected to D2, D3, D4 ; ; This Code Light Up All 7 colors in RGB ; ;

Changed in this revision

RGB_LED.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/RGB_LED.cpp	Sun Sep 30 12:57:06 2018 +0000
@@ -0,0 +1,40 @@
+#include "mbed.h" 
+
+DigitalOut B(D2,1);
+DigitalOut G(D3,1);
+DigitalOut R(D4,1);
+
+int main()
+{
+ while(1)
+ {
+  R=1;
+  G=1;
+  B=0;
+   wait(1);  
+  R=1;
+  G=0;
+  B=1;  
+   wait(1);
+  R=0;
+  G=1;
+  B=1; 
+   wait(1); 
+  R=0;
+  G=0;
+  B=1;    
+    wait(1);
+  R=0;
+  G=1;
+  B=0;   
+    wait(1);
+  R=1;
+  G=0;
+  B=0; 
+    wait(1);
+  R=0;
+  G=0;
+  B=0; 
+    wait(1);
+ }   
+}    
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sun Sep 30 12:57:06 2018 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/e95d10626187
\ No newline at end of file