Ich hätte hier ein einfaches einsteigerprogramm.
vieleicht musst du den Helligkeitswert 35 noch ein wenig varieren.Code:#include "asuro.h" int main(void){ unsigned int data[2]; Init(); FrontLED(ON); MotorDir(FWD,FWD); MotorSpeed(255,255); BackLED(ON,ON); while(1){ LineData(data); if (data[0] < 35 && data[1] < 35) {MotorSpeed(255,255); BackLED(ON,ON); MotorDir(FWD,RWD);} if (data[0] < 35 && data[1] > 35) {MotorSpeed(255,255); BackLED(OFF,ON); MotorDir(FWD,FWD);} if (data[0] > 35 && data[1] < 35) {MotorSpeed(255,50); BackLED(ON,OFF); MotorDir(FWD,FWD);} if (data[0] > 35 && data[1] > 35) {MotorSpeed(155,255); MotorDir(FWD,FWD);} } return 0; }
hoffe das hilft dir weiter
gruss Pascal






Zitieren

Lesezeichen