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: main.cpp
- Revision:
- 0:a18c4c309432
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Tue Jan 08 23:00:14 2019 +0000
@@ -0,0 +1,48 @@
+#include "mbed.h"
+
+PwmOut Red(PA2);
+DigitalOut Green(PB11);
+PwmOut Blue(PA1);
+
+
+
+int main()
+{
+ while(1){
+
+ Red.write(1);
+ Green.write(1);
+ Blue.write(1);
+
+
+ Red.write(0);
+ wait(1);
+ Red.write(1);
+
+ Green.write(0);
+ wait(1);
+ Green.write(1);
+
+ Blue.write(0);
+ wait(1);
+ Blue.write(1);
+
+ Blue.write(0.75);
+ wait(2);
+ Blue.write(1);
+
+ Red.write(0);
+ Green.write(0);
+ Blue.write(0);
+ wait(2);
+ Red.write(1);
+ Green.write(1);
+ Blue.write(1);
+
+ Red.write(0.5);
+ Blue.write(0.5);
+ wait(2);
+
+
+ }
+}
\ No newline at end of file