![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Lichter im Uhrzeigersinn
main.cpp@0:dd7edc75e697, 2015-11-16 (annotated)
- Committer:
- Dominik_2000
- Date:
- Mon Nov 16 14:38:10 2015 +0000
- Revision:
- 0:dd7edc75e697
Lichter im Uhrzeigersinn
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Dominik_2000 | 0:dd7edc75e697 | 1 | #include "mbed.h" |
Dominik_2000 | 0:dd7edc75e697 | 2 | #include "const.h" |
Dominik_2000 | 0:dd7edc75e697 | 3 | #include "Robot.h" |
Dominik_2000 | 0:dd7edc75e697 | 4 | |
Dominik_2000 | 0:dd7edc75e697 | 5 | Robot bertl; |
Dominik_2000 | 0:dd7edc75e697 | 6 | |
Dominik_2000 | 0:dd7edc75e697 | 7 | int main() |
Dominik_2000 | 0:dd7edc75e697 | 8 | { |
Dominik_2000 | 0:dd7edc75e697 | 9 | bertl.NibbleLeds(0x0F); |
Dominik_2000 | 0:dd7edc75e697 | 10 | wait(1); |
Dominik_2000 | 0:dd7edc75e697 | 11 | bertl.NibbleLeds(0x00); |
Dominik_2000 | 0:dd7edc75e697 | 12 | |
Dominik_2000 | 0:dd7edc75e697 | 13 | while(1) |
Dominik_2000 | 0:dd7edc75e697 | 14 | { |
Dominik_2000 | 0:dd7edc75e697 | 15 | bertl.TurnLedOn(LED_BL2); |
Dominik_2000 | 0:dd7edc75e697 | 16 | wait_ms(100); |
Dominik_2000 | 0:dd7edc75e697 | 17 | bertl.TurnLedOn(LED_BL1); |
Dominik_2000 | 0:dd7edc75e697 | 18 | wait_ms(100); |
Dominik_2000 | 0:dd7edc75e697 | 19 | bertl.TurnLedOn(LED_FL1); |
Dominik_2000 | 0:dd7edc75e697 | 20 | wait_ms(100); |
Dominik_2000 | 0:dd7edc75e697 | 21 | bertl.TurnLedOn(LED_FL2); |
Dominik_2000 | 0:dd7edc75e697 | 22 | wait_ms(100); |
Dominik_2000 | 0:dd7edc75e697 | 23 | bertl.TurnLedOn(LED_FR1); |
Dominik_2000 | 0:dd7edc75e697 | 24 | wait_ms(100); |
Dominik_2000 | 0:dd7edc75e697 | 25 | bertl.TurnLedOn(LED_FR2); |
Dominik_2000 | 0:dd7edc75e697 | 26 | wait_ms(100); |
Dominik_2000 | 0:dd7edc75e697 | 27 | bertl.RGBLed(1,1,1); |
Dominik_2000 | 0:dd7edc75e697 | 28 | wait_ms(100); |
Dominik_2000 | 0:dd7edc75e697 | 29 | bertl.TurnLedOn(LED_BR2); |
Dominik_2000 | 0:dd7edc75e697 | 30 | wait_ms(100); |
Dominik_2000 | 0:dd7edc75e697 | 31 | bertl.TurnLedOn(LED_BR1); |
Dominik_2000 | 0:dd7edc75e697 | 32 | wait_ms(100); |
Dominik_2000 | 0:dd7edc75e697 | 33 | bertl.NibbleLeds(0x08); |
Dominik_2000 | 0:dd7edc75e697 | 34 | wait_ms(100); |
Dominik_2000 | 0:dd7edc75e697 | 35 | bertl.NibbleLeds(0x04); |
Dominik_2000 | 0:dd7edc75e697 | 36 | wait_ms(100); |
Dominik_2000 | 0:dd7edc75e697 | 37 | bertl.NibbleLeds(0x02); |
Dominik_2000 | 0:dd7edc75e697 | 38 | wait_ms(100); |
Dominik_2000 | 0:dd7edc75e697 | 39 | bertl.NibbleLeds(0x01); |
Dominik_2000 | 0:dd7edc75e697 | 40 | wait_ms(100); |
Dominik_2000 | 0:dd7edc75e697 | 41 | bertl.NibbleLeds(0x00); |
Dominik_2000 | 0:dd7edc75e697 | 42 | wait_ms(100); |
Dominik_2000 | 0:dd7edc75e697 | 43 | bertl.TurnLedOff(LED_ALL); |
Dominik_2000 | 0:dd7edc75e697 | 44 | } |
Dominik_2000 | 0:dd7edc75e697 | 45 | } |