So sah das bei mir aus:
Code:
#include "asuro.h"
int main(void){
Init();
int zeit;
unsigned int taste1, taste2;
MotorDir(FWD,FWD);
MotorSpeed(120,124);
StatusLED(GREEN);
FrontLED(ON);
while (1){
taste1=PollSwitch();
taste2=PollSwitch();
if(taste1 == taste2){
if (taste == 1){
MotorSpeed(0,0);
StatusLED(RED);
BackLED(ON,ON);
MotorDir(RWD,RWD);
MotorSpeed(150,151);
for(zeit=0;zeit<1000;zeit++){
Sleep(72);
}
BackLED(OFF,OFF);
StatusLED(GREEN);
MotorDir(FWD,FWD);
MotorSpeed(0,180);
for (zeit=0; zeit<415; zeit++){
Sleep(72);
}
MotorSpeed(120,121);
for(zeit=0;zeit<500;zeit++){
Sleep(72);
}
BackLED(OFF,OFF);
StatusLED(GREEN);
MotorDir(FWD,FWD);
MotorSpeed(180,0);
for (zeit=0; zeit<415; zeit++){
Sleep(72);
}
MotorSpeed(120,121);
}
else if (taste==32){
MotorSpeed(0,0);
StatusLED(RED);
BackLED(ON,ON);
MotorDir(RWD,RWD);
MotorSpeed(150,152);
for(zeit=0;zeit<1000;zeit++){
Sleep(72);
}
BackLED(OFF,OFF);
StatusLED(GREEN);
MotorDir(FWD,FWD);
MotorSpeed(180,0);
for (zeit=0; zeit<415; zeit++){
Sleep(72);
}
MotorSpeed(120,122);
for(zeit=0;zeit<500;zeit++){
Sleep(72);
}
BackLED(OFF,OFF);
StatusLED(GREEN);
MotorDir(FWD,FWD);
MotorSpeed(0,180);
for (zeit=0; zeit<415; zeit++){
Sleep(72);
}
MotorSpeed(120,122);
}
else if (taste==16 || taste==2){
MotorSpeed(0,0);
StatusLED(RED);
BackLED(ON,ON);
MotorDir(RWD,RWD);
MotorSpeed(150,152);
for(zeit=0;zeit<1000;zeit++){
Sleep(72);
}
BackLED(OFF,OFF);
StatusLED(GREEN);
MotorDir(FWD,FWD);
MotorSpeed(0,180);
for (zeit=0; zeit<1000; zeit++){
Sleep(72);
}
MotorSpeed(120,122);
}
}
}
while(1);
return 0;
}
Und hier die Meldungen:
Code:
C:\ASURO_src\FirstTry>make all
-------- 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.
Size before:
test.elf :
section size addr
.text 4216 0
.data 16 8388704
.bss 1 8388720
.noinit 0 8388721
.eeprom 0 8454144
.stab 5772 0
.stabstr 2329 0
Total 12334
Size after:
test.elf :
section size addr
.text 4216 0
.data 16 8388704
.bss 1 8388720
.noinit 0 8388721
.eeprom 0 8454144
.stab 5772 0
.stabstr 2329 0
Total 12334
Errors: none
-------- end --------
> Process Exit Code: 0
Lesezeichen