Naoki Hasegawa
/
test2
a
Diff: test2.cpp
- Revision:
- 2:bd0c6b45d7cc
- Parent:
- 1:7f3cd64b15e6
- Child:
- 3:4668311bb7f0
--- a/test2.cpp Mon Jun 30 08:27:57 2014 +0000 +++ b/test2.cpp Wed Jul 02 06:25:40 2014 +0000 @@ -3,6 +3,9 @@ DigitalOut myled(P0_17); BusOut leds(P1_13, P1_14, P1_22, P0_17, P0_18, P0_19, P1_15, P0_1); + +void alles(); +void alle(); void all(); void rot(); void same(); @@ -14,7 +17,7 @@ wait(0.2); myled = 0x00; wait(0.2); - all(); + alles(); leds = 0x00; wait(0.2); rot(); @@ -22,7 +25,51 @@ roll(); } } + +void alles() +{ + float i = 0.5; + while(i>0){ + leds = 0x00; + wait(i); + leds = 0xff; + wait(i); + i = i-0.05; + } + +} + +void alle() +{ + leds = 0x00; + wait(0.5); + leds = 0xff; + wait(0.5); + + leds = 0x00; + wait(0.4); + leds = 0xff; + wait(0.4); + + leds = 0x00; + wait(0.3); + leds = 0xff; + wait(0.3); + + leds = 0x00; + wait(0.2); + leds = 0xff; + wait(0.2); + leds = 0x00; + wait(0.1); + leds = 0xff; + wait(0.1); + +} + + + void all() { leds = 0x00;