Problema con esempio RC522_RFID di pkourany su GITHUB

Ciao a tutti,

sto cercando di compilare l'esempio scaricato a questo URL GIT, ma purtroppo quando faccio verify, ottengo questo errore:

In file included from rc522_rfid.ino:39:0:
RFID.h:9:25: fatal error: application.h: No such file or directory
 #include "application.h"
                         ^
compilation terminated.

Sto cercando questo application.h ma non riesco a capire dove reperirlo. Da quello che vedo dal codice, se lo aspetta nella stessa directory dove sta RFID.h, ma non saprei da dove scaricarlo. Qualcuno mi saprebbe aiutare?

La butto li come ipotesi, probabilmente era un file di inclusione usato in debug, prova a rimuovere semplicemente l'include.

Quella libreria è per Spark Core, probabilmente quell'include fa parte del core per quell'hardware specifico.

Ok,

grazie ad entrambi!
Ho provato a togliere l'include, ma la cosa sembra peggiorata:

In file included from rc522_rfid.ino:39:0:
RFID.h:123:18: error: expected ‘)’ before ‘chipSelectPin’
     RFID(uint8_t chipSelectPin, uint8_t NRSTPD);
                  ^
RFID.h:125:18: error: expected ‘)’ before ‘chipSelectPin’
     RFID(uint8_t chipSelectPin, uint8_t NRSTPD, uint8_t mosiPin, uint8_t misoPin, uint8_t clockPin);
                  ^
RFID.h:132:20: error: ‘uint8_t’ has not been declared
  void writeMFRC522(uint8_t addr, uint8_t val);
                    ^
RFID.h:132:34: error: ‘uint8_t’ has not been declared
  void writeMFRC522(uint8_t addr, uint8_t val);
                                  ^
RFID.h:134:2: error: ‘uint8_t’ does not name a type
  uint8_t readMFRC522(uint8_t addr);
  ^
RFID.h:135:18: error: ‘uint8_t’ has not been declared
  void setBitMask(uint8_t reg, uint8_t mask);
                  ^
RFID.h:135:31: error: ‘uint8_t’ has not been declared
  void setBitMask(uint8_t reg, uint8_t mask);
                               ^
RFID.h:136:20: error: ‘uint8_t’ has not been declared
  void clearBitMask(uint8_t reg, uint8_t mask);
                    ^
RFID.h:136:33: error: ‘uint8_t’ has not been declared
  void clearBitMask(uint8_t reg, uint8_t mask);
                                 ^
RFID.h:137:20: error: ‘uint8_t’ has not been declared
  void calculateCRC(uint8_t *pIndata, uint8_t len, uint8_t *pOutData);
                    ^
RFID.h:137:38: error: ‘uint8_t’ has not been declared
  void calculateCRC(uint8_t *pIndata, uint8_t len, uint8_t *pOutData);
                                      ^
RFID.h:137:51: error: ‘uint8_t’ has not been declared
  void calculateCRC(uint8_t *pIndata, uint8_t len, uint8_t *pOutData);
                                                   ^
RFID.h:138:2: error: ‘uint8_t’ does not name a type
  uint8_t MFRC522Request(uint8_t reqMode, uint8_t *TagType);
  ^
RFID.h:139:2: error: ‘uint8_t’ does not name a type
  uint8_t MFRC522ToCard(uint8_t command, uint8_t *sendData, uint8_t sendLen, uint8_t *backData, uint16_t *backLen);
  ^
RFID.h:140:2: error: ‘uint8_t’ does not name a type
  uint8_t anticoll(uint8_t *serNum);
  ^
RFID.h:141:2: error: ‘uint8_t’ does not name a type
  uint8_t auth(uint8_t authMode, uint8_t BlockAddr, uint8_t *Sectorkey, uint8_t *serNum);
  ^
RFID.h:142:2: error: ‘uint8_t’ does not name a type
  uint8_t read(uint8_t blockAddr, uint8_t *recvData);
  ^
RFID.h:143:2: error: ‘uint8_t’ does not name a type
  uint8_t write(uint8_t blockAddr, uint8_t *writeData);
  ^
RFID.h:146:2: error: ‘uint8_t’ does not name a type
  uint8_t serNum[5];       // Constante para guardar el numero de serie leido.
  ^
RFID.h:147:2: error: ‘uint8_t’ does not name a type
  uint8_t AserNum[5];      // Constante para guardar el numero d serie de la secion actual.
  ^
RFID.h:150:5: error: ‘uint8_t’ does not name a type
     uint8_t softSPITranser(uint8_t data);      // SOFT SPI
     ^
RFID.h:152:5: error: ‘uint8_t’ does not name a type
     uint8_t _chipSelectPin;
     ^
RFID.h:153:2: error: ‘uint8_t’ does not name a type
  uint8_t _NRSTPD;
  ^
RFID.h:154:5: error: ‘uint8_t’ does not name a type
     uint8_t _mosiPin;
     ^
RFID.h:155:5: error: ‘uint8_t’ does not name a type
     uint8_t _misoPin;
     ^
RFID.h:156:5: error: ‘uint8_t’ does not name a type
     uint8_t _clockPin;
     ^
rc522_rfid.ino:43:21: error: ‘A2’ was not declared in this scope
rc522_rfid.ino:60:16: note: in expansion of macro ‘SS_PIN’
rc522_rfid.ino:44:21: error: ‘D2’ was not declared in this scope
rc522_rfid.ino:60:24: note: in expansion of macro ‘RST_PIN’
rc522_rfid.ino: In function ‘void setup()’:
rc522_rfid.ino:66:3: error: ‘Serial’ was not declared in this scope
rc522_rfid.ino:69:3: error: ‘SPI’ was not declared in this scope
rc522_rfid.ino:69:19: error: ‘SPI_MODE0’ was not declared in this scope
rc522_rfid.ino:70:19: error: ‘MSBFIRST’ was not declared in this scope
rc522_rfid.ino:71:23: error: ‘SPI_CLOCK_DIV8’ was not declared in this scope
rc522_rfid.ino: In function ‘void loop()’:
rc522_rfid.ino:81:3: error: ‘uint8_t’ was not declared in this scope
rc522_rfid.ino:89:5: error: ‘Serial’ was not declared in this scope
rc522_rfid.ino:92:9: error: ‘i’ was not declared in this scope
rc522_rfid.ino:94:26: error: ‘class RFID’ has no member named ‘serNum’
rc522_rfid.ino:94:36: error: ‘HEX’ was not declared in this scope
rc522_rfid.ino:100:7: error: ‘Serial’ was not declared in this scope
rc522_rfid.ino:102:13: error: ‘delay’ was not declared in this scope

Per quanto riguarda la libreria Spark Core: non ho capito quindi. Non va bene per RC522?

fbcyborg:
Per quanto riguarda la libreria Spark Core: non ho capito quindi. Non va bene per RC522?

No è l'opposto, non va bene per Arduino, è scritta per le schede Spark Core che sebbene sono Arduino Like usano un core diverso e librerie diverse.
Sicuramente è possibile adattarla per Arduino, però tocca lavorarci sopra.

Grazie! Ora mi è chiaro! :slight_smile: