Ups.Naja jetzt heißt das Programm MeinProg01.c und im makefile steht jetzt auch MeinProg01 .Jetzt kommt aber das hier raus.
Code:
-------- begin --------
avr-gcc (WinAVR 20100110) 4.3.3
Copyright (C) 2008 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.


Size before:
AVR Memory Usage
----------------
Device: atmega32

Program:    6834 bytes (20.9% Full)
(.text + .data + .bootloader)

Data:        175 bytes (8.5% Full)
(.data + .bss + .noinit)




Compiling: MeinProg01.c
avr-gcc -c -mmcu=atmega32 -I. -gdwarf-2   -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=MeinProg01.lst -I../../RP6Lib -I../../RP6Lib/RP6base -I../../RP6Lib/RP6common -std=gnu99 -MD -MP -MF .dep/MeinProg01.o.d MeinProg01.c -o MeinProg01.o
MeinProg01.c: In function 'bumpersStateChanged':
MeinProg01.c:14: warning: 'main' is normally a non-static function
MeinProg01.c:32: error: expected declaration or statement at end of input
make.exe: *** [MeinProg01.o] Error 1

> Process Exit Code: 2
> Time Taken: 00:00
Hab am Quelltext nochmal was verändert,da da ROTATE_SPEED definiert war,aber ich weiter unten TURN_SPEED benutzt habe:
Code:
#include "RP6RobotBaseLib.h"

#define MOVE_SPEED 50
#define TURN_SPEED 40
void bumpersStateChanged(void)
{
   if(bumper_left || bumper_right)
   {
      moveAtSpeed(0,0);
      move(MOVE_SPEED, BWD, DIST_MM(300), BLOCKING);
      rotate(TURN_SPEED, LEFT, 90, BLOCKING);
}

int main(void)
{
   initRobotBase();
   setLEDs(0b111111);
   mSleep(2500);
   setLEDs(0b001001);
    BUMPERS_setStateChangedHandler(bumpersStateChanged);
   
   powerON();

    changeDirection(FWD);
   moveAtSpeed(80,80);   

   while(true)
   {
      setLEDs(0b100100);
   }
   return 0;
}
Was jetzt?