Geschwindigkeitesregelung durch den Ultraschallsensor
Dependencies: BertlLib bertl_libraries mbed
Revision 0:9ff985002d48, committed 2016-04-25
- Comitter:
- TFuchsbichler
- Date:
- Mon Apr 25 06:58:09 2016 +0000
- Commit message:
- ;
Changed in this revision
diff -r 000000000000 -r 9ff985002d48 BertlLib.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/BertlLib.lib Mon Apr 25 06:58:09 2016 +0000 @@ -0,0 +1,1 @@ +https://developer.mbed.org/teams/Lab-4CHEL/code/BertlLib/#01d2bc098b6d
diff -r 000000000000 -r 9ff985002d48 bertl_libraries.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bertl_libraries.lib Mon Apr 25 06:58:09 2016 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/teams/Lab-4CHEL/code/bertl_libraries/#46115ad78747
diff -r 000000000000 -r 9ff985002d48 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Apr 25 06:58:09 2016 +0000 @@ -0,0 +1,31 @@ +#include "mbed.h" +#include "Bertl14.h" +#include "BertlObjects.h" +#include "class_hardware.h" +#include "pins_bertl.h" + + +BusOut boardPow(PW_MOT, PW_IR, PW_ENC); + +Motor m_right(MR_PWM, MR_FWD, MR_REV); +Motor m_left(ML_PWM, ML_FWD, ML_REV); + +USSensor usens(US_T,US_E); + +int main() { + boardPow=3; + InitBertl(); + pex.useISR=0; leds=9; + pex.ClearLeds(); + pex.WaitUntilButtonPressed(); + pex.WaitUntilButtonPressed(); + usens.initialize(); + while(1) { + + int speed = ( usens.distance_mm - 80 ) * 1; + + m_left.set(speed); + m_right.set(speed); + + } +}
diff -r 000000000000 -r 9ff985002d48 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Apr 25 06:58:09 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/082adc85693f \ No newline at end of file