Hallo,

ich habe folgenden Code:

Code:
#include "asuro.h" 
#define STOP 100 

int main(void) 
{ 

while(1) 
{ 

unsigned int lineData[2];
unsigned char running = TRUE; 
unsigned char i;
unsigned char taste=0;

Init();
FrontLED(ON); 
Sleep(255);
LineData(lineData); 

for(i=0;i<10;i++) 
{ 
PollSwitch(); 
} 
t=PollSwitch();

if ((lineData[0] > STOP) && (lineData[1] > STOP) && (t==0))
{ 
MotorDir(FWD,FWD); 
MotorSpeed(140,150); 

for(i=0;i<10;i++) 
{ 
PollSwitch(); 
} 

} 
else
{ 
MotorSpeed(0,0);
BackLED(ON,ON); 
Sleep(100); 
for(i=0; i<210; i++)
{ 
MotorDir(RWD,RWD); 
MotorSpeed(130,130); 
Sleep(100); 
} 
MotorSpeed(0,0); 

for(i=0; i<140; i++)
{ 
MotorDir(FWD,RWD); 
MotorSpeed(140,140); 
Sleep(100); 
} 
BackLED(OFF,OFF); 
} 

Sleep(100); 
} 
return 0; 
}
Mein Asuro verhält sich aber so als wäre ein Taster betätigt worden. Was ist falsch?