![](/media/cache/profiles/7afb8ae63b3672be6ffb0966eeb5d76d.jpg.50x50_q85.jpg)
funktion
main.cpp@0:0d6f0416f18e, 2015-12-21 (annotated)
- Committer:
- Sandro_Poelzl
- Date:
- Mon Dec 21 14:37:34 2015 +0000
- Revision:
- 0:0d6f0416f18e
Funktionen
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Sandro_Poelzl | 0:0d6f0416f18e | 1 | #include "mbed.h" |
Sandro_Poelzl | 0:0d6f0416f18e | 2 | #include "Robot.h" |
Sandro_Poelzl | 0:0d6f0416f18e | 3 | #include "ur_Bertl.h" |
Sandro_Poelzl | 0:0d6f0416f18e | 4 | |
Sandro_Poelzl | 0:0d6f0416f18e | 5 | Robot bertl; |
Sandro_Poelzl | 0:0d6f0416f18e | 6 | |
Sandro_Poelzl | 0:0d6f0416f18e | 7 | void Bewegen() |
Sandro_Poelzl | 0:0d6f0416f18e | 8 | { |
Sandro_Poelzl | 0:0d6f0416f18e | 9 | bertl.Move(); |
Sandro_Poelzl | 0:0d6f0416f18e | 10 | } |
Sandro_Poelzl | 0:0d6f0416f18e | 11 | |
Sandro_Poelzl | 0:0d6f0416f18e | 12 | void DrehNachRechts() |
Sandro_Poelzl | 0:0d6f0416f18e | 13 | { |
Sandro_Poelzl | 0:0d6f0416f18e | 14 | bertl.TurnRigth(); |
Sandro_Poelzl | 0:0d6f0416f18e | 15 | } |
Sandro_Poelzl | 0:0d6f0416f18e | 16 | |
Sandro_Poelzl | 0:0d6f0416f18e | 17 | void DrehNachLinks() |
Sandro_Poelzl | 0:0d6f0416f18e | 18 | { |
Sandro_Poelzl | 0:0d6f0416f18e | 19 | bertl.TurnLeft(); |
Sandro_Poelzl | 0:0d6f0416f18e | 20 | } |
Sandro_Poelzl | 0:0d6f0416f18e | 21 | |
Sandro_Poelzl | 0:0d6f0416f18e | 22 | void BlinkenRechts() |
Sandro_Poelzl | 0:0d6f0416f18e | 23 | { |
Sandro_Poelzl | 0:0d6f0416f18e | 24 | if(bertl.frontIsClear()) |
Sandro_Poelzl | 0:0d6f0416f18e | 25 | { |
Sandro_Poelzl | 0:0d6f0416f18e | 26 | bertl.TurnLedOn(LED_FR2); |
Sandro_Poelzl | 0:0d6f0416f18e | 27 | bertl.TurnLedOn(LED_BR1); |
Sandro_Poelzl | 0:0d6f0416f18e | 28 | |
Sandro_Poelzl | 0:0d6f0416f18e | 29 | wait(0.1); |
Sandro_Poelzl | 0:0d6f0416f18e | 30 | |
Sandro_Poelzl | 0:0d6f0416f18e | 31 | bertl.TurnLedOff(LED_FR2); |
Sandro_Poelzl | 0:0d6f0416f18e | 32 | bertl.TurnLedOff(LED_BR1); |
Sandro_Poelzl | 0:0d6f0416f18e | 33 | } |
Sandro_Poelzl | 0:0d6f0416f18e | 34 | |
Sandro_Poelzl | 0:0d6f0416f18e | 35 | |
Sandro_Poelzl | 0:0d6f0416f18e | 36 | } |
Sandro_Poelzl | 0:0d6f0416f18e | 37 | |
Sandro_Poelzl | 0:0d6f0416f18e | 38 | void BlinkenLinks() |
Sandro_Poelzl | 0:0d6f0416f18e | 39 | { |
Sandro_Poelzl | 0:0d6f0416f18e | 40 | if(bertl.frontIsClear()) |
Sandro_Poelzl | 0:0d6f0416f18e | 41 | { |
Sandro_Poelzl | 0:0d6f0416f18e | 42 | bertl.TurnLedOn(LED_FL2); |
Sandro_Poelzl | 0:0d6f0416f18e | 43 | bertl.TurnLedOn(LED_BL1); |
Sandro_Poelzl | 0:0d6f0416f18e | 44 | |
Sandro_Poelzl | 0:0d6f0416f18e | 45 | wait(0.1); |
Sandro_Poelzl | 0:0d6f0416f18e | 46 | |
Sandro_Poelzl | 0:0d6f0416f18e | 47 | bertl.TurnLedOff(LED_FL2); |
Sandro_Poelzl | 0:0d6f0416f18e | 48 | bertl.TurnLedOff(LED_BL1); |
Sandro_Poelzl | 0:0d6f0416f18e | 49 | } |
Sandro_Poelzl | 0:0d6f0416f18e | 50 | |
Sandro_Poelzl | 0:0d6f0416f18e | 51 | } |
Sandro_Poelzl | 0:0d6f0416f18e | 52 | |
Sandro_Poelzl | 0:0d6f0416f18e | 53 | |
Sandro_Poelzl | 0:0d6f0416f18e | 54 | void main() |
Sandro_Poelzl | 0:0d6f0416f18e | 55 | { |
Sandro_Poelzl | 0:0d6f0416f18e | 56 | |
Sandro_Poelzl | 0:0d6f0416f18e | 57 | } |