Hilfe! Mein Programm funktionirt nich!
Hi! ich hab mir grad ein Programm gebastelt, wo der asuro wenn er gegen etwas stößt eine rückwärtskurve macht. meiner ansicht nach müsste der folgenede progrmmcode funktionieren, aber er geht nicht:
Code:
#include "asuro.h"
int main(void)
{float x;
float y;
Init();
x=PollSwitch();
while(1<2){
if (x==0) {
StatusLED(GREEN);
MotorDir(FWD,FWD);
MotorSpeed(120,120);
}
else {
StatusLED(RED);
MotorDir(RWD,RWD);
MotorSpeed(255,0);
y=0;
while(y<40){
Sleep(255);
y++;
}
}
x=PollSwitch();
}
while(1);
return 0;
}
Bitte helft mir!!!!!!!!