so hier ist der code
Code:#include "asuro.h" void RWD(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 && t1 ==t2){ if(t1>0x00) { RWD; } } } return 0; }
Lesezeichen