Es gibt nur Warnungen, weil der Parameter für Sleep() größer als 8 Bit ist.
So vielleicht?
Code:#include "asuro.h" int main(void) { unsigned char taste; int g = 0, i; Init(); MotorSpeed(255,250); while (1){ if(g>0){ MotorDir(RWD,RWD); i = 1000; while(i--) Sleep(72); MotorDir(RWD,BREAK); i = 1000; while(i--) Sleep(72); g = 0; StatusLED(GREEN); } MotorDir(FWD,FWD); taste = ((PollSwitch() > 0) && (PollSwitch() > 0)); if (taste){ g = g+1; StatusLED(RED); } } while(1); return 0; }
Lesezeichen