Hallo David,
so, nun hab ich's:
Ändere die RC5 Abfragen 'mal so:
... und die while(1) Schleife so:Code:case RC5_KEY_SERVO_L: startSERVO(); setStopwatch6(0); startStopwatch6(); writeString_P("Servo nach links\n"); if (pos >= 10) { pos -= 10; } else { pos = 0; } servo1_position = pos; writeString_P("Servo Position:\n"); writeInteger(pos, DEC); break; case RC5_KEY_SERVO_R: startSERVO(); setStopwatch6(0); startStopwatch6(); writeString_P("Servo nach rechts\n"); if (pos <= (RIGHT_TOUCH - 10)) { pos += 10; } else { pos = RIGHT_TOUCH; } servo1_position = pos; writeString_P("Servo Position:\n"); writeInteger(pos, DEC); break;
Gruß DirkCode:stopSERVO(); while(true) { deccelerate(); task_SERVO(); if (getStopwatch6() > 300) {stopSERVO();} task_RP6System(); }







Zitieren

Lesezeichen