Hallo! Ich habe den Asuro zu meinem Geburtstag gestern bekommen. Alles Funktioniert.
Nun versuche ich schon ein eigenes Programm für den Asuro zu schreiben, das so aussieht:
Code:
#include "asuro.h"
int main(void){
Init()
MotorDir(FWD,FWD);
MotorSpeed(120,120);
StatusLED(GREEN);
while(PollSwitch()==0){
SerWrite("Alles OK!\n",10);
}
MotorSpeed(0,0);
StatusLED(RED);
while(1){
SerWrite("Aua!\n",5);
}
}
Nun habe ich das Problem mit dem Make. Ich speichere den Quellcode unter der Datei test.c und klicke auf "make". Dann schmeisst er mir jedoch folgendes raus:
C:\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=test.lst test.c \
| sed 's,\(.*\)\.o[ :]*,\1.o \1.d : ,g' > test.d; \
[ -s test.d ] || rm -f test.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=test.lst test.c -o test.o
test.c: In function `main':
test.c:5: error: parse error before "MotorDir"
MAKE.EXE: *** [test.o] Error 1
> Process Exit Code: 0
Wo liegt jetzt der Fehler im Quellcode? Ich habe vor "MotorDir" keinen entdecken können. Für Profis mag das wohl kein Problem darstellen aber ich bin ein völliger Neueinsteiger in das Gebiet Robotik und C-Programmierung. Vielen Dank schonmal im Voraus für eure Hilfe, damit ich endlich weiter machen kann mit dem selber Programme schreiben.
Lesezeichen