- Labornetzteil AliExpress         
Ergebnis 1 bis 2 von 2

Thema: asuro ultraschall

  1. #1

    asuro ultraschall

    Anzeige

    LiFePo4 Akku selber bauen - Video
    Hallo Zusammen!
    Ich habe 2 Fragen

    1. Ich habe ein fertiges Programm im Internet gefunden für asuro ultraschall.
    Bei Übertragung dieses Programms bekomme ich viele Fehlermeldungen.Kann mir jemand helfen?

    hier ist der Code:

    Ultraschall

    #inlude "asuro.h"
    void LocalInit(void)
    {
    TCCR2=(1<<WGM21) | (1<<CS20);
    OCR2=0x64;
    ADCSRA=0x00;
    ACSR=0x02;
    ADMUX=0x03;

    SFIOR|=(1<<ACME);
    DDRD&=~(1<<6);
    }

    void Ping (unsigned char length)

    {
    count 72kHz=0;
    TCCR2 = (1<<WGM21) | (1<<COM20) | (1<<CS20);
    while (count72kHz<length)
    {
    OCR2=ox64+length/2-count72kHz;
    }
    TCCR2 = (1<<WGM21) | (1<<CS20);
    OCR2=0x64;
    }

    int main (void)
    {
    int pos,i;
    int posmarker;
    Init();
    LocalInit();
    while(1)
    {
    posmarker=0;
    Ping(20);
    for (pos=0; pos<100; pos++)
    {
    Sleep(10);
    if ((ACSR&(1<<ACI))!=0)
    {
    if (posmarker==0) {posmarker=pos;}
    }
    ACSR|=(1<<ACI);
    }
    if (posmarker>10)
    {
    StatusLED(Green);
    MotorDir(FWD,FWD);
    MotorSpeed(100,100);
    }
    else
    {
    StatusLED(RED);
    MotorDir(FWD,RWD);
    MotorSpeed(0,100);
    for (i=0; i<100; i++) {Sleep(200);}
    }
    }
    return 0;
    }



    PS : bei Übertragung bekomme ich diese Meldung:

    > "C:\Dokumente und Einstellungen\Administrator\Desktop\ASURO_src\Firs tTry\Test-all.bat"

    C:\Dokumente und Einstellungen\Administrator\Desktop\ASURO_src\Firs tTry>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=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
    test.c:2:25: error: ultrasonic.h: No such file or directory
    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
    test.c:2:25: error: ultrasonic.h: No such file or directory
    -------- begin --------
    avr-gcc --version
    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.

    avr-gcc -c -mmcu=atmega8 -I. -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-ahlms=asuro.lst asuro.c -o asuro.o
    In file included from asuro.h:34,
    from asuro.c:29:
    c:/winavr-20100110/lib/gcc/../../avr/include/avr/signal.h:36:2: warning: #warning "This header file is obsolete. Use <avr/interrupt.h>."
    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
    In file included from asuro.h:34,
    from test.c:1:
    c:/winavr-20100110/lib/gcc/../../avr/include/avr/signal.h:36:2: warning: #warning "This header file is obsolete. Use <avr/interrupt.h>."
    test.c:2:25: error: ultrasonic.h: No such file or directory
    test.c:3: error: expected identifier or '(' before ',' token
    test.c: In function 'main':
    test.c:9: error: 'abstand' undeclared (first use in this function)
    test.c:9: error: (Each undeclared identifier is reported only once
    test.c:9: error: for each function it appears in.)
    test.c:9: warning: implicit declaration of function 'Chirp'
    test.c:10: warning: implicit declaration of function 'SerPrint'
    test.c:11: warning: implicit declaration of function 'PrintInt'
    test.c:38: error: expected declaration or statement at end of input
    test.c:38: error: expected declaration or statement at end of input
    make: *** [test.o] Error 1

    > Process Exit Code: 2
    > Time Taken: 00:01




    2. Kann mir jemand sagen, wo man eine asuro ultraschall Bausatz kaufen kann, wo die Leiterplatte schon verdrahtet ist? Ich finde die Leiterplatte nur ohne die Verdrahtung..

  2. #2
    Erfahrener Benutzer Roboter Genie Avatar von m.a.r.v.i.n
    Registriert seit
    24.07.2005
    Ort
    Berlin
    Beiträge
    1.247
    Hallo.

    Die Fehlermeldungen passen nicht zu dem Programm. Bitte noch mal überprüfen. Programm gespeichert vor dem Übersetzen?

Ähnliche Themen

  1. Asuro Ultraschall
    Von Guianik im Forum Asuro
    Antworten: 1
    Letzter Beitrag: 30.05.2011, 07:19
  2. Ultraschall für Asuro
    Von Problem im Forum Asuro
    Antworten: 5
    Letzter Beitrag: 21.11.2010, 07:39
  3. Antworten: 0
    Letzter Beitrag: 07.05.2010, 18:38
  4. Ultraschall Asuro
    Von schnabel im Forum Allgemeines zum Thema Roboter / Modellbau
    Antworten: 2
    Letzter Beitrag: 08.02.2009, 21:08
  5. Ultraschall für Asuro
    Von pingpong im Forum Asuro
    Antworten: 2
    Letzter Beitrag: 31.08.2005, 15:13

Berechtigungen

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

Labornetzteil AliExpress