- Labornetzteil AliExpress         
Seite 2 von 2 ErsteErste 12
Ergebnis 11 bis 14 von 14

Thema: Inhalt einer Variable über die IR-Schnittstelle übermitteln.

  1. #11
    Anzeige

    Powerstation Test
    Das sollte eigentlich in den einzelne taster thread

    Entschuldigung

  2. #12
    o.K. Also corde duo das kommt heraus bei deiner Funktion.

    Code:
    > "C:\ASURO_src\FirstTry\Test-all.bat" 
    
    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 (WinAVR 20090313) 4.3.2
    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:
    test.elf  :
    section           size      addr
    .text             1704         0
    .bss                 1   8388704
    .debug_aranges      64         0
    .debug_pubnames    263         0
    .debug_info       1072         0
    .debug_abbrev      414         0
    .debug_line       1142         0
    .debug_frame       288         0
    .debug_str         360         0
    .debug_loc         388         0
    Total             5696
    
    
    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 'PrintInt':
    test.c:11: warning: implicit declaration of function 'itoa'
    test.c:12: warning: implicit declaration of function 'strlen'
    test.c:12: warning: incompatible implicit declaration of built-in function 'strlen'
    test.c:12: warning: pointer targets in passing argument 1 of 'SerWrite' differ in signedness
    test.c: In function 'main':
    test.c:21: warning: pointer targets in passing argument 1 of 'SerWrite' differ in signedness
    test.c:27: error: expected declaration or statement at end of input
    make: *** [test.o] Error 1
    
    > Process Exit Code: 2
    > Time Taken: 00:02

  3. #13
    Erfahrener Benutzer Robotik Visionär Avatar von oberallgeier
    Registriert seit
    01.09.2007
    Ort
    Oberallgäu
    Beiträge
    8.694
    Zitat Zitat von Asuroneuling
    o.K. Also corde duo das kommt heraus bei deiner Funktion ...
    Der Code wäre jetzt hilfreich. Der GANZE Code. Vermutlich fehlt eine der beiden libs.
    #include <stdlib.h>
    #include <avr/io.h>

    Ausserdem würde ich für eine Messsequenz ein Feld aufmachen, dieses Feld vollschreiben und danach auf Knopfdruck ausgeben lassen. Damit kann man dann solche Diagramme machen . . . .
    Ciao sagt der JoeamBerg

  4. #14
    Code:
    > "C:\ASURO_src\FirstTry\Test-all.bat" 
    
    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 (WinAVR 20090313) 4.3.2
    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:
    test.elf  :
    section           size      addr
    .text             1740         0
    .bss                 1   8388704
    .debug_aranges      64         0
    .debug_pubnames    263         0
    .debug_info       1098         0
    .debug_abbrev      445         0
    .debug_line       1158         0
    .debug_frame       288         0
    .debug_str         365         0
    .debug_loc         388         0
    Total             5810
    
    
    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 'PrintInt':
    test.c:13: warning: implicit declaration of function 'strlen'
    test.c:13: warning: incompatible implicit declaration of built-in function 'strlen'
    test.c:13: warning: pointer targets in passing argument 1 of 'SerWrite' differ in signedness
    test.c: In function 'main':
    test.c:22: warning: pointer targets in passing argument 1 of 'SerWrite' differ in signedness
    test.c:28: error: expected declaration or statement at end of input
    make: *** [test.o] Error 1
    
    > Process Exit Code: 2
    > Time Taken: 00:00
    Das kam heraus und das ist der dazugehörige code von core duo mit deiner Bibliotheken modifizierung.

    Code:
    #include "asuro.h" 
    #include <stdlib.h> 
    #include <avr/io.h>
    int main(void){ 
    
       unsigned int line[2], i; 
       Init(); 
    
       void PrintInt(int wert) 
         {      
         char text[16]="      "; 
         itoa(wert,text,10); 
         SerWrite(text,strlen(text)); 
         } 
    
       FrontLED(ON); 
       StatusLED(OFF); 
    
       while(1){ 
           LineData(line); 
           PrintInt(line[0]); 
           SerWrite("\n", 1);       
           for(i= 0; i< 200; i++){ 
               Sleep(255); 
           } 
       while(1); 
       return 0; 
    }

Seite 2 von 2 ErsteErste 12

Berechtigungen

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

12V Akku bauen