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:634dd505dace
- Child:
- 1:0191658b6ff4
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Fri Oct 19 14:14:45 2018 +0000
@@ -0,0 +1,44 @@
+#include "mbed.h"
+
+DigitalOut Phase1 (p21);
+DigitalOut Phase2 (p22);
+DigitalOut Phase3 (p23);
+DigitalOut Phase4 (p24);
+
+int main() {
+float x=0.02, y=0.01;
+while(1) {
+ Phase1 = 1;
+ Phase2 = Phase3 = Phase4 = 0;
+ wait(x);
+
+ Phase1 = Phase2 = 1;
+ Phase3 = Phase4 = 0;
+ wait(y);
+
+ Phase2 = 1;
+ Phase1 = Phase3 = Phase4 = 0;
+ wait(x);
+
+ Phase2 = Phase3 = 1;
+ Phase1 = Phase4 = 0;
+ wait(y);
+
+ Phase3 = 1;
+ Phase1 = Phase2 = Phase4 = 0;
+ wait(x);
+
+ Phase3 = Phase4 = 1;
+ Phase1 = Phase2 = 0;
+ wait(y);
+
+ Phase4 = 1;
+ Phase1 = Phase2 = Phase3 = 0;
+ wait(x);
+
+ Phase4 = Phase1 = 1;
+ Phase2 = Phase3 = 0;
+ wait(y);
+
+ }
+}
\ No newline at end of file