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:dca773225ff5
diff -r 000000000000 -r dca773225ff5 main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Sun May 22 20:17:03 2022 +0000
@@ -0,0 +1,28 @@
+#include "mbed.h"
+DigitalOut pin1(p5);
+DigitalOut pin2(p6);
+DigitalOut pin3(p7);
+DigitalOut pin4(p8);
+
+DigitalOut myled1(LED1);
+DigitalOut myled2(LED2);
+DigitalOut myled3(LED3);
+DigitalOut myled4(LED4);
+int main() {
+ while(1) {
+ for(int i=0;i<4; i++)
+ {
+ pin1=1;pin2=1;pin3=0;pin4=0;myled1=1;wait(0.002);myled1=0;
+ pin1=0;pin2=1;pin3=1;pin4=0;myled2=1;wait(0.002);myled2=0;
+ pin1=0;pin2=0;pin3=1;pin4=1;myled3=1;wait(0.002);myled3=0;
+ pin1=1;pin2=0;pin3=0;pin4=1;myled4=1;wait(0.002);myled4=0;
+ }
+ for(int i=0;i<4; i++)
+ {
+ pin1=1;pin2=1;pin3=0;pin4=0;myled1=1;wait(0.002);myled1=0;
+ pin1=0;pin2=1;pin3=1;pin4=0;myled2=1;wait(0.002);myled2=0;
+ pin1=0;pin2=0;pin3=1;pin4=1;myled3=1;wait(0.002);myled3=0;
+ pin1=1;pin2=0;pin3=0;pin4=1;myled4=1;wait(0.002);myled4=0;
+ }
+}
+}
\ No newline at end of file