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.
main.cpp
- Committer:
- simontruelove
- Date:
- 2018-10-19
- Revision:
- 0:634dd505dace
- Child:
- 1:0191658b6ff4
File content as of revision 0:634dd505dace:
#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);
}
}