Go Down

Topic: Errore nella programmazione dello Spiderin (Read 2816 times) previous topic - next topic

DASA

Mar 07, 2014, 01:49 pm Last Edit: Mar 08, 2014, 10:59 am by leo72 Reason: 1
Salve a tutti, sto programmando un robot spiderin (link) con l'aiuto del sito e consultando vari forum, adesso però sono ad un punto di non ritorno
mi dà i seguenti errori:

Code: [Select]
spiderin:34: error: 'IRrecv' does not name a type
spiderin:35: error: 'decode_results' does not name a type
spiderin.ino: In function 'void setup()':
spiderin:51: error: 'irrecv' was not declared in this scope
spiderin.ino: In function 'void loop()':
spiderin:65: error: 'irrecv' was not declared in this scope
spiderin:65: error: 'results' was not declared in this scope
spiderin.ino: In function 'void IRcommand()':
spiderin:99: error: 'results' was not declared in this scope
spiderin:111: error: 'irrecv' was not declared in this scope
spiderin.ino: In function 'void setServoWalk()':
spiderin:277: error: 'irrecv' was not declared in this scope
spiderin:277: error: 'results' was not declared in this scope


Di seguito ho aggiunto il file della mia programmazione. Grazie in anticipo  ;)


gpb01

DASA,
prima di tutto, essendo il tuo primo post, vogliamo presentarci QUI e leggere con attenzione il REGOLAMENTO ???

E dopo che lo avrai fatto, cortesemente cancelli il tuo secondo post e il codice, tutto assieme, lo racchiudi nei tag "code" come è spiegato nel regolamento.

Se è troppo lungo e non te lo fa postare, lo ALLEGHI come file, non lo riporti così per intero !

Grazie,

Guglielmo
Search is Your friend ... or I am Your enemy !

DASA

Salve, non sapevo dell'esistenza di questi forum grazie comunque, mi sono già presentato ed ho letto il regolamento.

gpb01

#3
Mar 07, 2014, 02:31 pm Last Edit: Mar 07, 2014, 02:34 pm by gpb01 Reason: 1
Perfetto, benvenuto :)

Così, solo leggendo gli errori, sembra che o non hai incluso la libreria IR ... o non la trova ...

da dove l'hai scaricata ? Dove e come l'hai messa ?

Guglielmo

Edit : Ho visto che l'hai inclusa .. quindi ... probabilmente non la trova ...  :smiley-roll:
Search is Your friend ... or I am Your enemy !

gpb01

Confermo ... non hai messo la libreria IRremote la posto giusto ...

Ho preso il tuo programma e ... lo compila senza alcun errore :  XD

Code: [Select]
Binary sketch size: 16,956 bytes (of a 32,256 byte maximum)

Guglielmo
Search is Your friend ... or I am Your enemy !

DASA

#5
Mar 07, 2014, 02:40 pm Last Edit: Mar 07, 2014, 02:46 pm by DASA Reason: 1
Grazie :) , ma dove devo andarla a metterla la libreria IR?

gpb01

#6
Mar 07, 2014, 02:47 pm Last Edit: Mar 07, 2014, 02:50 pm by gpb01 Reason: 1
Se dal IDE vai in Arduino -> Preferences, in testa vedi quale è il percorso "Sketchbook location" ...
... seguendo quel percorso sul tuo pc, devi creare una cartella libraries (se non è già esistente) e dentro questa cartella devi copiare tutte le cartelle di tutte le librerie che ora e in futuro vorrai usare ... :)

Esempio, da me la "Sketchbook location" è : "C:\Users\gpb01\Documents\Arduino" quindi ...
... tutte le librerie andranno messe dentro a : "C:\Users\gpb01\Documents\Arduino\libraries" ...

La libreria la devi mettere con tutta la sua cartellina quindi, prendi la cartella IRremote e la metti li dentro da cui :

"C:\Users\gpb01\Documents\Arduino\libraries\IRremote"

Chiaramente da me la mia cartella utente si chiama gpb01, da te si chiamerà in un altro modo ... quello sopra è un esempio ... ;)

Guglielmo

Edit: Stai attento, scaricando da GitHub, viene aggiunto il suffisso "-master" alla cartella ... lo devi togliere, la cartella deve avere lo stesso nome del .h che è contenuto dentro e che tu includi nel tuo programma ;)
Search is Your friend ... or I am Your enemy !

DASA

#7
Mar 07, 2014, 02:53 pm Last Edit: Mar 07, 2014, 10:18 pm by UweFederer Reason: 1
Fatto, ma mi da sempre errore :(
Code: [Select]
In file included from C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp:13:
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\/IRremoteInt.h:87: error: 'uint8_t' does not name a type
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\/IRremoteInt.h:88: error: 'uint8_t' does not name a type
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\/IRremoteInt.h:89: error: 'uint8_t' does not name a type
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\/IRremoteInt.h:92: error: 'uint8_t' does not name a type
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp: In member function 'void IRsend::mark(int)':
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp:173: error: 'delayMicroseconds' was not declared in this scope
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp: In member function 'void IRsend::space(int)':
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp:181: error: 'delayMicroseconds' was not declared in this scope
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp: In member function 'void IRsend::enableIROut(int)':
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp:200: error: 'OUTPUT' was not declared in this scope
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp:200: error: 'pinMode' was not declared in this scope
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp:201: error: 'LOW' was not declared in this scope
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp:201: error: 'digitalWrite' was not declared in this scope
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp: In constructor 'IRrecv::IRrecv(int)':
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp:217: error: 'volatile struct irparams_t' has no member named 'recvpin'
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp:218: error: 'volatile struct irparams_t' has no member named 'blinkflag'
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp: In member function 'void IRrecv::enableIRIn()':
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp:241: error: 'volatile struct irparams_t' has no member named 'rcvstate'
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp:242: error: 'volatile struct irparams_t' has no member named 'rawlen'
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp:246: error: 'volatile struct irparams_t' has no member named 'recvpin'
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp:246: error: 'INPUT' was not declared in this scope
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp:246: error: 'pinMode' was not declared in this scope
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp: In member function 'void IRrecv::blink13(int)':
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp:252: error: 'volatile struct irparams_t' has no member named 'blinkflag'
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp:254: error: 'OUTPUT' was not declared in this scope
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp:254: error: 'pinMode' was not declared in this scope
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp: In function 'void __vector_9()':
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp:268: error: 'volatile struct irparams_t' has no member named 'recvpin'
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp:268: error: 'digitalRead' was not declared in this scope
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp:271: error: 'volatile struct irparams_t' has no member named 'rawlen'
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp:273: error: 'volatile struct irparams_t' has no member named 'rcvstate'
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp:275: error: 'volatile struct irparams_t' has no member named 'rcvstate'
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp:284: error: 'volatile struct irparams_t' has no member named 'rawlen'
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp:285: error: 'volatile struct irparams_t' has no member named 'rawlen'
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp:287: error: 'volatile struct irparams_t' has no member named 'rcvstate'
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp:293: error: 'volatile struct irparams_t' has no member named 'rawlen'
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp:295: error: 'volatile struct irparams_t' has no member named 'rcvstate'
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp:300: error: 'volatile struct irparams_t' has no member named 'rawlen'
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp:302: error: 'volatile struct irparams_t' has no member named 'rcvstate'
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp:310: error: 'volatile struct irparams_t' has no member named 'rcvstate'
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp:321: error: 'volatile struct irparams_t' has no member named 'blinkflag'
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp:323: error: 'B00100000' was not declared in this scope
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp:326: error: 'B11011111' was not declared in this scope
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp: In member function 'void IRrecv::resume()':
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp:332: error: 'volatile struct irparams_t' has no member named 'rcvstate'
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp:333: error: 'volatile struct irparams_t' has no member named 'rawlen'
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp: In member function 'int IRrecv::decode(decode_results*)':
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp:343: error: 'volatile struct irparams_t' has no member named 'rawlen'
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp:344: error: 'volatile struct irparams_t' has no member named 'rcvstate'
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp: In member function 'long int IRrecv::decodeNEC(decode_results*)':
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp:392: error: 'volatile struct irparams_t' has no member named 'rawlen'
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp:400: error: 'volatile struct irparams_t' has no member named 'rawlen'
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp: In member function 'long int IRrecv::decodeSony(decode_results*)':
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp:433: error: 'volatile struct irparams_t' has no member named 'rawlen'
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp:443: error: 'volatile struct irparams_t' has no member named 'rawlen'
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp: In member function 'long int IRrecv::decodeRC5(decode_results*)':
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp:518: error: 'volatile struct irparams_t' has no member named 'rawlen'
C:\Users\Danilo\Documents\Arduino\libraries\IRremote\IRremote.cpp:529: error: 'volatile struct irparams_t' has no member named 'rawlen'


Può essere che avvolte la libreria che ho io di IR remote sia forse danneggiata?

DASA

Ci sono riuscito grazie Guglielmo :)

gpb01

Ottimo ... immagino fosse una vecchia versione ... :)

Guglielmo
Search is Your friend ... or I am Your enemy !


uwefed

Se metti una nuova libreria devi chiudere l'IDE e riaprirlo.
Fai i controlli delle librerie sollo all'accesione.
Ciao Uwe

Go Up