Gast
#2140650
Mein selbsterstelltes Programm für den ASURO:
#include "asuro.h"
int main(void)
{
Init(void);
int i=0;
for (i=0;i<10;++i)
{
BackLED (OFF, ON);
Msleep(50/1000);
BackLED (ON, OFF);
Msleep(50/1000);
}
BackLED (OFF, OFF);
unsigned int data[2];
Init();
FrontLED(ON);
MotorDir(FWD,FWD); while(1){
LineData(data);
if (data [0] > data [1] )
{MotorSpeed(200,150);} else
{MotorSpeed(150,200);}
}
while (1);
return 0;
}
Fehlermeldungen:
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:5: warning: function declaration isn't a prototype
test.c: In function `main':
test.c:12: warning: implicit declaration of function `Msleep'
test.c: At top level:
test.c:32: error: parse error before "return"
test.c:32:78: warning: no newline at end of file
make: *** [test.o] Error 1
> Process Exit Code: 2
Könnte mir vielleicht jemand helfen, die Fehler zu berichtigen?
Ich bin noch ganz neu in dem Programmieren eines Asuro.
Danke schon mal im Voraus,
AKI