Der Gibt mir jetzt ein error raus vllt muss ich noch irgend was einfügen:
Programm:
Code:
#include "asuro.h"  // "Er fäht nach vorne----> Stößt an----> Dreht sich---->Stößt wieder an----> Fährt rückwärts"  
int main(void){  Init();    // " Er fäht nach vorne"   
MotorSpeed(112,100); 
MotorDir(FWD,FWD); 
StatusLED(GREEN);             
if (PollSwitch()>0) {   // Stößt an----> Dreht sich     
MotorSpeed(112,100);     
MotorDir(RWD,FWD);     
BackLED(ON,ON);     
FrontLED(ON);     
StatusLED(RED);}          
for(i=0;i<200;i++) Sleep(72); 
if (PollSwitch()>0){      
MotorSpeed(112,100);     
MotorDir(RWD,RWD);     
StatusLED(RED);     
BackLED(ON,ON);}                
while(1);       
return 0;  }
Errorcode:
Code:
avr-gcc -c -mmcu=atmega8 -I. -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-ahlms=test.lst test.c -o test.o
test.c: In function `main':
test.c:13: error: `i' undeclared (first use in this function)
test.c:13: error: (Each undeclared identifier is reported only once
test.c:13: error: for each function it appears in.)
test.c:22: error: parse error at end of input
make: *** [test.o] Error 1