Liste der Anhänge anzeigen (Anzahl: 1)
Hallo
Die Überprüfung von PollSwitch() ist sinnvoll, vor allem bei laufenden Motoren "lügt" die Funktion recht häufig. RWD ist ein reserviertes Wort weil es in asuro.h definiert ist. Mir ist schleierhaft wie ihr solchen Mist fehlerfrei kompilieren könnt:
Code:
#include "asuro.h"
void xRWD(void)
{
MotorDir(RWD,RWD);
MotorSpeed(200,200);
Msleep(1000);
}
int main(void)
{
unsigned char t1, t2;
Init();
while (1)
{
//PollSwitch();
//PollSwitch();
t1 = PollSwitch();
t2 = PollSwitch();
MotorDir(FWD,FWD);
MotorSpeed(250,250);
if(t1 ==t2){
if(t1>0x00) {
xRWD();
}
}
}
return 0;
}
Gruß
mic