adafruit / Adafruit-PN532

Arduino library for SPI and I2C access to the PN532 RFID/Near Field Communication chip
Other
419 stars 267 forks source link

Feather M0 spi #48

Closed DaveCalaway closed 4 years ago

DaveCalaway commented 6 years ago

I use the example "readMifareClassic" in this library. I checked the compatibility in the main page, i attached the device with SPI, but the compiler give me this error: ` /tmp/arduino_modified_sketch_622904/readMifareClassic.pde: In function 'void setup()': readMifareClassic:67: error: 'SerialUSB' was not declared in this scope

define Serial SerialUSB

               ^

/tmp/arduino_modified_sketch_622904/readMifareClassic.pde:72:13: note: in expansion of macro 'Serial' while (!Serial); // for Leonardo/Micro/Zero ^ readMifareClassic:67: error: 'SerialUSB' was not declared in this scope

define Serial SerialUSB

               ^

/tmp/arduino_modified_sketch_622904/readMifareClassic.pde:74:3: note: in expansion of macro 'Serial' Serial.begin(115200); ^ /tmp/arduino_modified_sketch_622904/readMifareClassic.pde: In function 'void loop()': readMifareClassic:67: error: 'SerialUSB' was not declared in this scope

define Serial SerialUSB

               ^

/tmp/arduino_modified_sketch_622904/readMifareClassic.pde:108:5: note: in expansion of macro 'Serial' Serial.println("Found an ISO14443A card"); ^ exit status 1 'SerialUSB' was not declared in this scope `

BenBergman commented 4 years ago

I had a similar issue and just commented out the SerialUSB line. After doing that the examples worked for me.

ladyada commented 4 years ago

fixed in 1.2.0+