Danke für deine Antwort hai,
ich habe jetzt dieses Programm geschrieben:
while(1) ist nun am Anfang und umschließt if und else.Code:#include "asuro.h" int main(void) { Init(); while(1) { if (PollSwitch()==0) { MotorDir(FWD,FWD); MotorSpeed(150,170); BackLED(ON,ON); FrontLED(ON); StatusLED(GREEN); } else { MotorDir(FWD,FWD); MotorSpeed(0,0); StatusLED(RED); } return 0; } }
Es funktioniert schon etwas besser als das vorherige Programm, allerdings Reagiert der Asuro nun bei einem Gedrückten Kollisionstaster überhaupt nicht, und fährt einfach weiter.
Wo liegt nun das Problem?







Zitieren

Lesezeichen