Irgendwie sprint der immer in else. Der Läuft das Programm einfach von oben nach unten durch.
Woran kann das liegen?
Hier noch mal das Programm:
Lg christoph[/code]Code:#include "asuro.h" int main(void) { unsigned char taste; Init(); while(1) { PollSwitch(); PollSwitch(); PollSwitch(); PollSwitch(); PollSwitch(); PollSwitch(); taste = PollSwitch(); if(taste == 0) { StatusLED(GREEN); MotorDir(FWD,FWD); MotorSpeed(150,150);} else { MotorSpeed(0,0); MotorDir(RWD,RWD); MotorSpeed(150,150); Sleep (36); MotorDir(FWD,RWD); StatusLED(RED); MotorSpeed(100,90); Sleep (36); SerWrite("Mann ich hab zu tun, verschwinde! Ich muss weiter!",40); MotorSpeed(0,0); } } }







Zitieren

Lesezeichen