Collaboration Coding Test
Dependencies: mbed
/media/uploads/Incursion4life/mbed.bld /media/uploads/Incursion4life/main.cpp
Diff: main.cpp
- Revision:
- 3:427eb23a8a0c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Aug 27 22:01:48 2014 +0000 @@ -0,0 +1,44 @@ +#include "mbed.h" + +DigitalOut IN1(p21); +DigitalOut IN2(p22); +DigitalOut IN3(p23); +DigitalOut IN4(p24); + +int main() { + IN1=0; + IN2=0; + IN3=0; + IN4=0; + wait(200); + while (1) { + for(int i=0;i<3;i++){ + wait(200); + if(i>3){i=0;} + switch(i){ + case 0: + IN1=1; + IN2=0; + IN3=1; + IN4=0; + case 1: + IN1=0; + IN2=1; + IN3=1; + IN4=0; + + case 3: + IN1=0; + IN2=1; + IN3=0; + IN4=1; + case 4: + IN1=1; + IN2=0; + IN3=0; + IN4=1; + } + } + + } +} \ No newline at end of file