hehe

Dependencies:   mbed

main.cpp

Committer:
charageo
Date:
2018-04-16
Revision:
0:6ce3d073a033

File content as of revision 0:6ce3d073a033:

#include "mbed.h"
 
case 270_GRAD_RECHTS

buttonNow = button.read();
if (buttonNow && !buttonBefore {  //detect button rising edge
    controller.set RotationalVelociy(0.0f);
    state = LANGSAM_FAHREN;
    } else if ((irSensorF.read() > DISTANCE_THRESHOLD)
                && (irSensorR.read() > DISTANCE_THRESHOLD)
                && (irSensorL.read() < DISTANCE_THRESHOLD) {
    controller.setTranslationalVelocity(TRANSLATIONAL_VELOCITY);
    state= VORWAERTSFAHREN;
}