Aber hallo! Einfach umbenennen gilt natürlich nicht:
So können es wir zwar lesen, der Mega8 (und auch das Flashtool) können damit aber nichts anfangen. Das Programm muss erst kompiliert werden.Code:#include "asuro.h" int main(void) { unsigned int data[2]; Init(); FrontLED(ON) MotorDir(FWD,FWD); MotorSpeed(255,255); while(1) { LineData(data) if ((data [0] < 20) && (data [1] > 20 )) { MotorDir(RWD,FWD); MotorSpeed(0,255); BackLED(OFF,ON); StatusLED(RED); } if ((data [1] < 20) && (data [0] > 20 )) { MotorDir(FWD,RWD); MotorSpeed(255,0); BackLED(ON,OFF); StatusLED(RED); } if ((data [1] < 20) && (data [0] < 20)) { MotorDir(FWD,FWD); MotorSpeed(255,255); BackLED(ON,ON); StatusLED(GREEN); } } return 0; }
Schau mal in der Anleitung Kapitel 8 (ab Seite 35)
Gruß
mic







Zitieren
Lesezeichen