- LiFePO4 Speicher Test         
Seite 2 von 8 ErsteErste 1234 ... LetzteLetzte
Ergebnis 11 bis 20 von 76

Thema: Asuro soll den US abstand über Hyper Terminal ausgeben

  1. #11
    Erfahrener Benutzer Fleißiges Mitglied
    Registriert seit
    18.11.2010
    Ort
    Österreich
    Alter
    30
    Beiträge
    173
    Anzeige

    LiFePo4 Akku selber bauen - Video
    Habe mal diesen Code


    Code:
    #include "asuro.h"
    #include "ultrasonic.h"
    
    int i,j,abstand=200; // Variablen deklarieren
    
    
    
    
    int main(void) // Hier beginnt das Programm
    {
    Init();	
    	while (1)  //Endlosschleife
    	{	
        abstand = Chirp();
    	SerPrint("\r\n distanz in cm: ");
        PrintInt(abstand);	
    	
       while (abstand>10)
       {
    	MotorDir(FWD,FWD);
    	MotorSpeed(180,180);
    	StatusLED(GREEN);	
    	abstand = Chirp();
    	SerPrint("\r\n distanz in cm: ");
        PrintInt(abstand);		
    			
    	}							// Bei Kollision:
    			
    		for (j=0;j<100;j++)		// kurz warten			
    			{
    			MotorDir(FREE,FREE);
    			Sleep(255);
    			}
    			
    		for (i=0;i<200;i++)
    			{
    			MotorDir(RWD,RWD);	  // rückwärts drehen 
    			MotorSpeed(120,0);
    			BackLED(ON,ON);
    			StatusLED(RED);
    			Sleep(255);
    			}
    			for (j=0;j<100;j++)	// kurz warten
    			{
    			MotorDir(FREE,FREE);
    			Sleep(255);
    			}
    	    
    	}

    Code:
    test.c:2:24: ultrasonic.h: No such file or directory
    test.c: In function `main':
    test.c:14: warning: implicit declaration of function `Chirp'
    test.c:15: warning: implicit declaration of function `SerPrint'
    test.c:16: warning: implicit declaration of function `PrintInt'
    test.c:49:10: warning: no newline at end of file
    test.c:49: error: parse error at end of input
    make: *** [test.o] Error 1
    ich muss doch noch ultrasonic.h ind den Ordner und ein neues Makefile

    habe ich auch gemacht aber nichts anders ?????????????

    Lg

  2. #12
    Erfahrener Benutzer Roboter Genie Avatar von m.a.r.v.i.n
    Registriert seit
    24.07.2005
    Ort
    Berlin
    Beiträge
    1.247
    Moment mal, welche Version der Asuro Lib verwendest du? Chirp, SerPrint, PrintInt kennt deine Version nicht. MotorDir, MotrSpeed, aber schon. Das ist also irgend eine alte Version.

    Ich ging bisher davon aus das du die aktuelle AsuroLib V3.80RC1 verwendest.

    make-all.bat sollte von der command shell cmd ausgeführt werden, nicht aus PN.

  3. #13
    Erfahrener Benutzer Fleißiges Mitglied
    Registriert seit
    18.11.2010
    Ort
    Österreich
    Alter
    30
    Beiträge
    173
    Ok was mach ich jetzt mit der alles

  4. #14
    Erfahrener Benutzer Fleißiges Mitglied
    Registriert seit
    18.11.2010
    Ort
    Österreich
    Alter
    30
    Beiträge
    173
    Ach diesen ...... habe ich schon mal gehabt

    C:\ASURO_src\FirstTry>pause
    Drcken Sie eine beliebige Taste . . .


    Was mach ich jetzt ich habe nur das make all.bat in First Try getan

  5. #15
    Erfahrener Benutzer Fleißiges Mitglied
    Registriert seit
    18.11.2010
    Ort
    Österreich
    Alter
    30
    Beiträge
    173
    habe jetzt wider anderes make all.bat(das hat 48 Byte)

    das was ich mit gerade gasaugt habe hat 53 Byte (bei den kommt die meldung Drcken Sie eine beliebige Taste . . . )

    Besser wär wenn du mir erklährst was ich alles ändern soll
    ich mache worher alles auf original ok

    LG

  6. #16
    Erfahrener Benutzer Roboter Genie Avatar von m.a.r.v.i.n
    Registriert seit
    24.07.2005
    Ort
    Berlin
    Beiträge
    1.247
    Ok, alles von Anfang an.

    Du öffnest den Arbeitsplatz und wechselst in das Verzeichnis in welches du die Asuro Lib entpackt hast.
    Dann in den Unterorder 'examples\USTest'.
    Dann Doppelklick auf 'make-all.bat'
    Es öffnet sich ein Fenster mit einer cmd shell.
    In dem Fenster ganz nach oben scrollen. Rechter Mausklick auf markieren.
    Dann alle Ausgeben bis zum Ende markiern (gedrückte linke Maustaste)
    Dann wieder rechte Maustaste auf Kopieren klicken.
    Jetzt kannst du die Ausgaben hier in einem Post einfügen.

  7. #17
    Erfahrener Benutzer Fleißiges Mitglied
    Registriert seit
    18.11.2010
    Ort
    Österreich
    Alter
    30
    Beiträge
    173
    Ok

    Soll ich da drinnen dann was ändern oder

    Wenn ja was?

  8. #18
    Erfahrener Benutzer Roboter Genie Avatar von m.a.r.v.i.n
    Registriert seit
    24.07.2005
    Ort
    Berlin
    Beiträge
    1.247
    Nein, nichts ändern. Erst mal nur übersetzen. Wenn das klappt schauen wir weiter.

  9. #19
    Erfahrener Benutzer Fleißiges Mitglied
    Registriert seit
    18.11.2010
    Ort
    Österreich
    Alter
    30
    Beiträge
    173
    Code:
    C:\ASURO_src\FirstTry>make clean 
    -------- begin --------
    rm -f test.hex
    rm -f test.eep
    rm -f test.obj
    rm -f test.cof
    rm -f test.elf
    rm -f test.map
    rm -f test.obj
    rm -f test.a90
    rm -f test.sym
    rm -f test.lnk
    rm -f test.lss
    rm -f test.o asuro.o  
    rm -f  test.lst asuro.lst
    rm -f test.s asuro.s
    rm -f test.d asuro.d
    Errors: none
    -------- end --------
    
    C:\ASURO_src\FirstTry>make MCU=atmega8 LIBFILE=asuro 
    set -e; avr-gcc -MM -mmcu=atmega8 -I. -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-ahlms=asuro.lst asuro.c \
    | sed 's,\(.*\)\.o[ :]*,\1.o \1.d : ,g' > asuro.d; \
    [ -s asuro.d ] || rm -f asuro.d
    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:2: error: parse error before ':' token
    test.c:2: error: stray '\' in program
    test.c:2: error: stray '\' in program
    test.c:2: error: stray '\' in program
    test.c:2: error: stray '\' in program
    test.c:2: error: stray '\' in program
    test.c:2: error: stray '\' in program
    test.c:23: error: stray '\' in program
    test.c:23: error: stray '\' in program
    test.c:23: error: stray '\' in program
    test.c:23: error: stray '\' in program
    test.c:23: error: stray '\' in program
    test.c:23: error: stray '\' in program
    test.c:28:7: warning: unknown escape sequence '\)'
    test.c:28:7: warning: unknown escape sequence '\.'
    test.c:28:7: warning: character constant too long for its type
    test.c:33:7: warning: unknown escape sequence '\)'
    test.c:33:7: warning: unknown escape sequence '\.'
    test.c:33:7: warning: character constant too long for its type
    test.c:37:15: too many decimal points in number
    test.c:52: error: stray '\' in program
    test.c:52: error: stray '\' in program
    test.c:52: error: stray '\' in program
    test.c:52: error: stray '\' in program
    test.c:52: error: stray '\' in program
    test.c:52: error: stray '\' in program
    test.c:52: error: stray '\' in program
    test.c:52:34: too many decimal points in number
    test.c:52: error: stray '\' in program
    test.c:52: error: stray '\' in program
    test.c:52: error: stray '\' in program
    test.c:52: error: stray '\' in program
    test.c:52: error: stray '\' in program
    test.c:52: error: stray '\' in program
    test.c:52: error: stray '\' in program
    test.c:56: error: stray '\' in program
    test.c:56: error: stray '\' in program
    test.c:56: error: stray '\' in program
    test.c:56: error: stray '\' in program
    test.c:56: error: stray '\' in program
    test.c:56: error: stray '\' in program
    test.c:56: error: stray '\' in program
    test.c:56:34: too many decimal points in number
    test.c:56: error: stray '\' in program
    test.c:56: error: stray '\' in program
    test.c:56: error: stray '\' in program
    test.c:56: error: stray '\' in program
    test.c:56: error: stray '\' in program
    test.c:56: error: stray '\' in program
    test.c:56: error: stray '\' in program
    test.c:61: error: stray '\' in program
    test.c:61: error: stray '\' in program
    test.c:61: error: stray '\' in program
    test.c:61: error: stray '\' in program
    test.c:61: error: stray '\' in program
    test.c:61: error: stray '\' in program
    test.c:63: error: stray '\374' in program
    test.c:63:39: warning: no newline at end of file
    make: *** [test.o] Error 1
    
    > Process Exit Code: 2

    Meinst du das ?

  10. #20
    Erfahrener Benutzer Roboter Genie Avatar von m.a.r.v.i.n
    Registriert seit
    24.07.2005
    Ort
    Berlin
    Beiträge
    1.247
    Ja, so etwas meinte ich. Allerdings verstehe ich die Fehlermeldungen nicht. Wie sieht denn die test.c dazu aus? Außerdem ist deine WinAVR Version veraltet, ziel dir mal eine neuere Version. http://sourceforge.net/projects/wina...nAVR/20100110/

Seite 2 von 8 ErsteErste 1234 ... LetzteLetzte

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •  

LiFePO4 Speicher Test