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.
Diff: RGB_LED.cpp
- Revision:
- 0:947ed6edab0f
--- /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