Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 0:947ed6edab0f, committed 2018-09-30
- 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