so habe in die makefile mal statt test linienfolgen2 hingschrieben (so heißt das programm)
ich schreibe mal das programm:
#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;
}
Und die neuen fehlermeldungen:
C:\Users\Daniel\Desktop\ASURO_src\FirstTry>make all
set -e; avr-gcc -MM -mmcu=atmega8 -I. -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-ahlms=linienfolgen2.lst linienfolgen2.c \
| sed 's,\(.*\)\.o[ :]*,\1.o \1.d : ,g' > linienfolgen2.d; \
[ -s linienfolgen2.d ] || rm -f linienfolgen2.d
-------- begin --------
avr-gcc --version
avr-gcc (GCC) 3.3.1
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
avr-gcc -c -mmcu=atmega8 -I. -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-ahlms=linienfolgen2.lst linienfolgen2.c -o linienfolgen2.o
linienfolgen2.c: In function `main':
linienfolgen2.c:7: error: parse error before "MotorDir"
linienfolgen2.c:11: error: parse error before "if"
linienfolgen2.c: At top level:
linienfolgen2.c:33: error: parse error before "return"
linienfolgen2.c:34:2: warning: no newline at end of file
make: *** [linienfolgen2.o] Error 1
> Process Exit Code: 2
> Time Taken: 00:01
Lesezeichen