Stefan Lewicki
/
B16_Linie_Folgen_V1
Bertl16 folgt Linie
Bertl16 folgt Linie.
Revision 0:653d365cb6e6, committed 2016-05-20
- Comitter:
- Lenschinki
- Date:
- Fri May 20 14:15:57 2016 +0000
- Commit message:
- Bertl folgt Linie
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
diff -r 000000000000 -r 653d365cb6e6 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri May 20 14:15:57 2016 +0000 @@ -0,0 +1,51 @@ +#include "mbed.h" +DigitalOut Von (P2_13); // 12 V ON +DigitalOut LineON (P2_5); // Line Sensor aktivieren + +DigitalOut MotorL_EN(P1_19); // Enable OB DIE LINKS ODER RECHTS IST NOCH NICHT KLAR ! +DigitalOut MotorL_For(P2_14); // Forwerts +DigitalOut MotorL_Rev(P2_15); // Rückwerts + +DigitalOut MotorR_EN(P2_19); //Die Leitung führt zum Pin PO_21 am Prozessor +DigitalOut MotorR_For(P2_21); //Die Leitung führt zum Pin P1_3 am Prozessor +DigitalOut MotorR_Rev(P2_20); + +DigitalIn ISO1 (P1_9); // ISO1 +DigitalIn ISO2 (P0_16); +DigitalIn ISO3 (P0_23); +DigitalIn ISO4 (P0_15); +DigitalIn ISO5 (P1_3); // OSI5 + +int main() { + Von = 1; + LineON = 1; + MotorL_EN = MotorR_EN = 1; + while(1) { + + + if(ISO1 != 1) + if(ISO4 != 1) { + MotorR_Rev = 1; + MotorL_Rev = 1; + } + + if(ISO1 == 1) { + MotorR_Rev = 1; + MotorL_Rev = 0; + wait(0.01); + MotorR_Rev = 0; + } + + if(ISO4 == 1) { + MotorR_Rev = 0; + MotorL_Rev = 1; + wait(0.01); + MotorL_Rev = 0; + { + + + + } +} +} +}
diff -r 000000000000 -r 653d365cb6e6 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri May 20 14:15:57 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/7c328cabac7e \ No newline at end of file