In dem datei Test.c von den SelbTest quell code steht wie das beim Selbtest gemacht wird:
Code:
/* ---------------------- */
/* ----- Switch Test ---- */
/* K1 -> Status LED Green */
/* K2 -> Status LED RED */
/* K3 -> Line LED */
/* K4 -> Break LED Left */
/* K5 -> Break LED Rigth */
/* K6 -> Motor Left */
/* ---------------------- */
void SwitchTest(void)
{
unsigned char sw,tmp;
MotorDir(FWD,BREAK);
sw = PollSwitch();
StatusLED(OFF);
FrontLED(OFF);
BackLED(OFF,OFF);
MotorSpeed(0,0);
tmp = 0;
if (sw & 0x01)
MotorSpeed(200,0);
if (sw & 0x02) {
BackLED(OFF,ON);
tmp = ON;
}
if (sw & 0x04)
BackLED(ON,tmp);
if (sw & 0x08)
FrontLED(ON);
if (sw & 0x10)
RED_LED_ON;
if (sw & 0x20)
GREEN_LED_ON;
}
/* END Switch Test ------------------------------ */
Lesezeichen