Hallo
In beiden Programmen sind n Haufn Fehler daher zeig ich dir einfach mal die Methode die ich benutzt habe:
Max an der einen Seite:
undCode:void RichtungA(void) {BackLED(OFF,OFF); StatusLED(GREEN); BackLED(OFF,ON); Sleep(15); BackLED(OFF,OFF); Sleep(255);Sleep(255);Sleep(255); Sleep(255);Sleep(255);Sleep(255); BackLED(OFF,ON); Sleep(15); BackLED(OFF,OFF); Sleep(255);Sleep(255);Sleep(255); Sleep(255);Sleep(255);Sleep(255); }
Code:void RichtungB(void) {BackLED(OFF,OFF); StatusLED(GREEN); BackLED(OFF,ON); Sleep(80); BackLED(OFF,OFF); Sleep(255);Sleep(255);Sleep(255); Sleep(255);Sleep(255);Sleep(255); BackLED(OFF,ON); Sleep(80); BackLED(OFF,OFF); Sleep(255);Sleep(255);Sleep(255); Sleep(255);Sleep(255);Sleep(255); }
Im Hauptprogramm werden diese dann so aufgerufen.
Versuchs mal soCode:.... int c; for(c=0; c<15; c++) {RichtungA();} for(c=0; c<100; c++) {Sleep(100);} for(c=0; c<15; c++) {RichtungB();} ...
Gruß Thund3r







Zitieren

Lesezeichen