Hallo
-while(v==255) müsste while(v<255) heisen.
-int v sollte ein unsigned char sein
-for return(0) sollte ein while(1) sein
-Sleep()-Schleife zu lang
GrußCode:#include "asuro.h" int main(void){ Init(); unsigned char v; int d; v=50; MotorDir(FWD,FWD); while(v<255){ MotorSpeed(v,v); v++; if (v & 8) StatusLED(RED); else StatusLED(YELLOW); for(d=0;d<5;d++){ Sleep(255); } } while(v>0){ v--; MotorSpeed(v,v); if (v & 8) StatusLED(RED); else StatusLED(YELLOW); for(d=0;d<5;d++){ Sleep(255); } } StatusLED(GREEN); while(1); return 0; }
mic







Zitieren

Lesezeichen