Ich hab das ganze jetzt einmal auf die 1 Taste gekürtzt, dass man sehen kann, ob das überhaupt funktioniert.
Versuchs mal mit dem hier:
Code:#include "asuro.h" int main(void) { Init(); int zeit; unsigned char taste,taste1,taste2; MotorDir(FWD,FWD); MotorSpeed(120,124); StatusLED(GREEN); FrontLED(ON); while (1){ taste1 = PollSwitch(); taste2 = PollSwitch(); if(taste1 == taste2); {taste = taste1; if (taste==1) { MotorSpeed(0,0); StatusLED(RED); BackLED(ON,ON); MotorDir(RWD,RWD); MotorSpeed(150,151); for(zeit=0;zeit<1000;zeit++) { Sleep(72); } BackLED(OFF,OFF); StatusLED(GREEN); MotorDir(FWD,FWD); MotorSpeed(0,180); for (zeit=0; zeit<500; zeit++) { Sleep(72); } MotorSpeed(120,121); for(zeit=0;zeit<500;zeit++) { Sleep(72); } BackLED(OFF,OFF); StatusLED(GREEN); MotorDir(FWD,FWD); MotorSpeed(180,0); for (zeit=0; zeit<500; zeit++) { Sleep(72); } MotorDir(FWD,RWD); MotorSpeed(150,151); for(zeit=0;zeit<3000;zeit++) }} return(0); } }







Zitieren

Lesezeichen