hoho
Dependencies: mbed
Fork of 90GRAD_RECHTS by
main.cpp@0:a09c9455aab0, 2018-04-16 (annotated)
- Committer:
- charageo
- Date:
- Mon Apr 16 13:14:51 2018 +0000
- Revision:
- 0:a09c9455aab0
joo
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
charageo | 0:a09c9455aab0 | 1 | #include "mbed.h" |
charageo | 0:a09c9455aab0 | 2 | |
charageo | 0:a09c9455aab0 | 3 | case 90_GRAD_RECHTS |
charageo | 0:a09c9455aab0 | 4 | |
charageo | 0:a09c9455aab0 | 5 | buttonNOW = button.read(); |
charageo | 0:a09c9455aab0 | 6 | if (buttonNow && !buttonBefore { // deect button rising edge |
charageo | 0:a09c9455aab0 | 7 | controller.setRotationalVelocity(0.0f); |
charageo | 0:a09c9455aab0 | 8 | state = LANGSAM_FAHREN; |
charageo | 0:a09c9455aab0 | 9 | } else if ((irSensorR < DISTANCE_THRESHOLD) { |
charageo | 0:a09c9455aab0 | 10 | controller.setTranslationalvelocity(TRANSLATIONAL_VELOCITY); |
charageo | 0:a09c9455aab0 | 11 | state = VORWAERTSFAHREN; |
charageo | 0:a09c9455aab0 | 12 | } |