![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
qwe
main.cpp@0:9786c1febbee, 2015-07-16 (annotated)
- Committer:
- harseed951
- Date:
- Thu Jul 16 08:57:34 2015 +0000
- Revision:
- 0:9786c1febbee
asd; ;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
harseed951 | 0:9786c1febbee | 1 | #include "mbed.h" |
harseed951 | 0:9786c1febbee | 2 | |
harseed951 | 0:9786c1febbee | 3 | DigitalOut a(p8); |
harseed951 | 0:9786c1febbee | 4 | DigitalOut b(p12); |
harseed951 | 0:9786c1febbee | 5 | DigitalOut c(p11); |
harseed951 | 0:9786c1febbee | 6 | DigitalOut d(p5); |
harseed951 | 0:9786c1febbee | 7 | DigitalOut e(p6); |
harseed951 | 0:9786c1febbee | 8 | DigitalOut f(p7); |
harseed951 | 0:9786c1febbee | 9 | DigitalOut g(p9); |
harseed951 | 0:9786c1febbee | 10 | DigitalOut h(p10); |
harseed951 | 0:9786c1febbee | 11 | DigitalOut w(LED1); |
harseed951 | 0:9786c1febbee | 12 | DigitalOut x(LED2); |
harseed951 | 0:9786c1febbee | 13 | DigitalOut y(LED3); |
harseed951 | 0:9786c1febbee | 14 | DigitalOut z(LED4); |
harseed951 | 0:9786c1febbee | 15 | |
harseed951 | 0:9786c1febbee | 16 | int main() |
harseed951 | 0:9786c1febbee | 17 | { |
harseed951 | 0:9786c1febbee | 18 | while (1) |
harseed951 | 0:9786c1febbee | 19 | { |
harseed951 | 0:9786c1febbee | 20 | a=b=c=d=e=f=h=0; //0 |
harseed951 | 0:9786c1febbee | 21 | g=1; |
harseed951 | 0:9786c1febbee | 22 | wait(0.5); |
harseed951 | 0:9786c1febbee | 23 | a=g=d=e=f=h=1; //1 |
harseed951 | 0:9786c1febbee | 24 | b=c=0; |
harseed951 | 0:9786c1febbee | 25 | wait(0.5); |
harseed951 | 0:9786c1febbee | 26 | a=b=g=d=e=h=0; //2 |
harseed951 | 0:9786c1febbee | 27 | c=f=1; |
harseed951 | 0:9786c1febbee | 28 | wait(0.5); |
harseed951 | 0:9786c1febbee | 29 | a=b=c=d=g=h=0; //3 |
harseed951 | 0:9786c1febbee | 30 | f=e=1; |
harseed951 | 0:9786c1febbee | 31 | wait(0.5); |
harseed951 | 0:9786c1febbee | 32 | b=c=f=g=h=0; //4 |
harseed951 | 0:9786c1febbee | 33 | a=d=e=1; |
harseed951 | 0:9786c1febbee | 34 | wait(0.5); |
harseed951 | 0:9786c1febbee | 35 | a=g=c=d=f=h=0; //5 |
harseed951 | 0:9786c1febbee | 36 | b=e=1; |
harseed951 | 0:9786c1febbee | 37 | wait(0.5); |
harseed951 | 0:9786c1febbee | 38 | c=d=e=f=g=h=0; //6 |
harseed951 | 0:9786c1febbee | 39 | a=b=1; |
harseed951 | 0:9786c1febbee | 40 | wait(0.5); |
harseed951 | 0:9786c1febbee | 41 | a=b=c=h=0; //7 |
harseed951 | 0:9786c1febbee | 42 | d=e=f=g=1; |
harseed951 | 0:9786c1febbee | 43 | wait(0.5); |
harseed951 | 0:9786c1febbee | 44 | a=b=c=d=e=f=h=0; //8 |
harseed951 | 0:9786c1febbee | 45 | g=0; |
harseed951 | 0:9786c1febbee | 46 | wait(0.5); |
harseed951 | 0:9786c1febbee | 47 | a=b=c=d=g=f=h=0; //9 |
harseed951 | 0:9786c1febbee | 48 | e=1; |
harseed951 | 0:9786c1febbee | 49 | wait(0.5); |
harseed951 | 0:9786c1febbee | 50 | a=b=c=d=e=f=g=h=1; |
harseed951 | 0:9786c1febbee | 51 | wait(1); |
harseed951 | 0:9786c1febbee | 52 | w=x=y=z=1; |
harseed951 | 0:9786c1febbee | 53 | wait(0.5); |
harseed951 | 0:9786c1febbee | 54 | w=x=y=z=0; |
harseed951 | 0:9786c1febbee | 55 | wait(0.5); |
harseed951 | 0:9786c1febbee | 56 | a=b=c=d=g=f=h=0; //9 |
harseed951 | 0:9786c1febbee | 57 | e=1; |
harseed951 | 0:9786c1febbee | 58 | wait(0.5); |
harseed951 | 0:9786c1febbee | 59 | a=b=c=d=e=f=g=h=0; //8 |
harseed951 | 0:9786c1febbee | 60 | wait(0.5); |
harseed951 | 0:9786c1febbee | 61 | a=b=c=h=0; //7 |
harseed951 | 0:9786c1febbee | 62 | d=e=f=g=1; |
harseed951 | 0:9786c1febbee | 63 | wait(0.5); |
harseed951 | 0:9786c1febbee | 64 | c=d=e=f=g=h=0; //6 |
harseed951 | 0:9786c1febbee | 65 | a=b=1; |
harseed951 | 0:9786c1febbee | 66 | wait(0.5); |
harseed951 | 0:9786c1febbee | 67 | a=g=c=d=f=h=0; //5 |
harseed951 | 0:9786c1febbee | 68 | b=e=1; |
harseed951 | 0:9786c1febbee | 69 | wait(0.5); |
harseed951 | 0:9786c1febbee | 70 | b=c=f=g=h=0; //4 |
harseed951 | 0:9786c1febbee | 71 | a=d=e=1; |
harseed951 | 0:9786c1febbee | 72 | wait(0.5); |
harseed951 | 0:9786c1febbee | 73 | a=b=c=d=g=h=0; //3 |
harseed951 | 0:9786c1febbee | 74 | f=e=1; |
harseed951 | 0:9786c1febbee | 75 | wait(0.5); |
harseed951 | 0:9786c1febbee | 76 | a=b=g=d=e=h=0; //2 |
harseed951 | 0:9786c1febbee | 77 | c=f=1; |
harseed951 | 0:9786c1febbee | 78 | wait(0.5); |
harseed951 | 0:9786c1febbee | 79 | a=g=d=e=f=h=1; //1 |
harseed951 | 0:9786c1febbee | 80 | b=c=0; |
harseed951 | 0:9786c1febbee | 81 | wait(0.5); |
harseed951 | 0:9786c1febbee | 82 | a=b=c=d=e=f=h=0; //0 |
harseed951 | 0:9786c1febbee | 83 | g=1; |
harseed951 | 0:9786c1febbee | 84 | wait(0.5); |
harseed951 | 0:9786c1febbee | 85 | } |
harseed951 | 0:9786c1febbee | 86 | } |