I have been working on this sketch for some time (on and off). I got it to about 99% to where I want it. After a couple of months without working on it I try to compile it and get an error. After many hours trying to find where and why I narrowed it down to Audio.h. I used a stripped down version of the sketch to find it. Without adding any code for audio and the only difference was adding Audio.h I get the shown error. This sketch worked with all the components until just awhile ago. I even tried reverting back to older libraries and IDE releases and still get the error. Has anyone experienced the same with MFRC522 and Audio.h?
Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'
Use code tags (the < CODE/ > icon above the compose window) to make it easier to read and copy for examination
https://forum.arduino.cc/t/how-to-get-the-best-out-of-this-forum
Please post your full sketch, using code tags when you do
Posting your code using code tags prevents parts of it being interpreted as HTML coding and makes it easier to copy for examination
In my experience the easiest way to tidy up the code and add the code tags is as follows
Start by tidying up your code by using Tools/Auto Format in the IDE to make it easier to read. Then use Edit/Copy for Forum and paste what was copied in a new reply. Code tags will have been added to the code to make it easy to read in the forum thus making it easier to provide help.
It is also helpful to post error messages in code tags as it makes it easier to scroll through them and copy them for examination
It looks likely that Audio.h has a definition of byte that is different to the one in Arduino.h
In your for loop, change byte to unsigned char or uint8_t
I don't know when it changed because it had been working for at least a year and all of a sudden it seems like something changed. Even back tracking everything I can't get it to work again. I tried just changing byte for uint8_t and get even longer error. Although I may have missed something. Sketch coming.
```cpp
#include <Adafruit_NeoPixel.h>
#include <MFRC522v2.h>
#include <MFRC522DriverSPI.h>
#include <MFRC522DriverPinSimple.h>
#include <MFRC522Debug.h>
// Led Setup
#define PIN 12
#define PIN2 13
Adafruit_NeoPixel strip = Adafruit_NeoPixel(12, PIN, NEO_GRB + NEO_KHZ800);
Adafruit_NeoPixel strip2 = Adafruit_NeoPixel(12, PIN2, NEO_GRB + NEO_KHZ800);
// SPI and RFID setup
MFRC522DriverPinSimple ss_pin(5); // Create pin driver. See typical pin layout above.
#define RST_PIN 15
#define SPI_MOSI 23 // SD Card
#define SPI_MISO 19
#define SPI_SCK 18
SPIClass &spiClass = SPI; // Alternative SPI e.g. SPI2 or from library e.g. softwarespi.
const SPISettings spiSettings = SPISettings(SPI_CLOCK_DIV4, MSBFIRST, SPI_MODE0); // May have to be set if hardware is not fully compatible to Arduino specifications.
MFRC522DriverSPI driver{ ss_pin, spiClass, spiSettings }; // Create SPI driver.
MFRC522 mfrc522{ driver }; // Create MFRC522 instance.
void setup() {
Serial.begin(115200); // Initialize serial communications with the PC for debugging.
while (!Serial)
; // Do nothing if no serial port is opened (added for Arduinos based on ATMEGA32U4).
mfrc522.PCD_Init(); // Init MFRC522 board.
// LED
strip.begin();
strip2.begin();
strip.setBrightness(15);
strip2.setBrightness(15);
strip.show(); // Initialize all pixels to 'off'
strip2.show(); // Initialize all pixels to 'off'
}
// Fill the dots one after the other with a color
void colorWipe(uint32_t c, uint8_t wait) {
for (uint16_t i = 0; i < strip.numPixels(); i++) {
strip.setPixelColor(i, c);
strip.show();
delay(wait);
}
}
void colorWipe2(uint32_t c, uint8_t wait) {
for (int i = strip2.numPixels(); i >= 0; i--) {
strip2.setPixelColor(i, c);
strip2.show();
delay(wait);
}
}
void loop() {
if (!mfrc522.PICC_IsNewCardPresent() || !mfrc522.PICC_ReadCardSerial()) {
return;
}
Serial.print("Card UID: ");
//MFRC522Debug::PrintUID(Serial, (mfrc522.uid));
//Serial.println();
// Save the UID on a String variable
String uidString = "";
for (byte i = 0; i < mfrc522.uid.size; i++) {
if (mfrc522.uid.uidByte[i] < 0x10) {
uidString += "0";
}
uidString += String(mfrc522.uid.uidByte[i], HEX);
}
Serial.println(uidString);
if (uidString == "93abe51a") {
Serial.println("Access Granted Pink");
colorWipe(strip.Color(0, 255, 0), 60), colorWipe2(strip2.Color(0, 255, 0), 60);
colorWipe(strip.Color(0, 0, 0), 1), colorWipe2(strip2.Color(0, 0, 0), 1);
}
else if (uidString == "187a3999") {
Serial.println("Access Granted Grey");
colorWipe(strip.Color(0, 0, 255), 60), colorWipe2(strip2.Color(0, 0, 255), 60);
colorWipe(strip.Color(0, 0, 0), 1), colorWipe2(strip2.Color(0, 0, 0), 1);
} else {
Serial.println("Access Denied");
colorWipe(strip.Color(255, 0, 0), 60), colorWipe2(strip2.Color(255, 0, 0), 60);
colorWipe(strip.Color(0, 0, 0), 1), colorWipe2(strip2.Color(0, 0, 0), 1);
}
}
This compiles and works as expected.
```cpp
#include <Adafruit_NeoPixel.h>
#include <Audio.h>
#include <MFRC522v2.h>
#include <MFRC522DriverSPI.h>
#include <MFRC522DriverPinSimple.h>
#include <MFRC522Debug.h>
// Led Setup
#define PIN 12
#define PIN2 13
Adafruit_NeoPixel strip = Adafruit_NeoPixel(12, PIN, NEO_GRB + NEO_KHZ800);
Adafruit_NeoPixel strip2 = Adafruit_NeoPixel(12, PIN2, NEO_GRB + NEO_KHZ800);
// SPI and RFID setup
MFRC522DriverPinSimple ss_pin(5); // Create pin driver. See typical pin layout above.
#define RST_PIN 15
#define SPI_MOSI 23 // SD Card
#define SPI_MISO 19
#define SPI_SCK 18
SPIClass &spiClass = SPI; // Alternative SPI e.g. SPI2 or from library e.g. softwarespi.
const SPISettings spiSettings = SPISettings(SPI_CLOCK_DIV4, MSBFIRST, SPI_MODE0); // May have to be set if hardware is not fully compatible to Arduino specifications.
MFRC522DriverSPI driver{ ss_pin, spiClass, spiSettings }; // Create SPI driver.
MFRC522 mfrc522{ driver }; // Create MFRC522 instance.
void setup() {
Serial.begin(115200); // Initialize serial communications with the PC for debugging.
while (!Serial)
; // Do nothing if no serial port is opened (added for Arduinos based on ATMEGA32U4).
mfrc522.PCD_Init(); // Init MFRC522 board.
// LED
strip.begin();
strip2.begin();
strip.setBrightness(15);
strip2.setBrightness(15);
strip.show(); // Initialize all pixels to 'off'
strip2.show(); // Initialize all pixels to 'off'
}
// Fill the dots one after the other with a color
void colorWipe(uint32_t c, uint8_t wait) {
for (uint16_t i = 0; i < strip.numPixels(); i++) {
strip.setPixelColor(i, c);
strip.show();
delay(wait);
}
}
void colorWipe2(uint32_t c, uint8_t wait) {
for (int i = strip2.numPixels(); i >= 0; i--) {
strip2.setPixelColor(i, c);
strip2.show();
delay(wait);
}
}
void loop() {
if (!mfrc522.PICC_IsNewCardPresent() || !mfrc522.PICC_ReadCardSerial()) {
return;
}
Serial.print("Card UID: ");
//MFRC522Debug::PrintUID(Serial, (mfrc522.uid));
//Serial.println();
// Save the UID on a String variable
String uidString = "";
for (byte i = 0; i < mfrc522.uid.size; i++) {
if (mfrc522.uid.uidByte[i] < 0x10) {
uidString += "0";
}
uidString += String(mfrc522.uid.uidByte[i], HEX);
}
Serial.println(uidString);
if (uidString == "93abe51a") {
Serial.println("Access Granted Pink");
colorWipe(strip.Color(0, 255, 0), 60), colorWipe2(strip2.Color(0, 255, 0), 60);
colorWipe(strip.Color(0, 0, 0), 1), colorWipe2(strip2.Color(0, 0, 0), 1);
}
else if (uidString == "187a3999") {
Serial.println("Access Granted Grey");
colorWipe(strip.Color(0, 0, 255), 60), colorWipe2(strip2.Color(0, 0, 255), 60);
colorWipe(strip.Color(0, 0, 0), 1), colorWipe2(strip2.Color(0, 0, 0), 1);
} else {
Serial.println("Access Denied");
colorWipe(strip.Color(255, 0, 0), 60), colorWipe2(strip2.Color(255, 0, 0), 60);
colorWipe(strip.Color(0, 0, 0), 1), colorWipe2(strip2.Color(0, 0, 0), 1);
}
}
This gives error.
And the error is ?
Which Arduino board are you using ?
This is the error I get.
In file included from C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:18,
from C:\Users\ubear\OneDrive\ESP Boards\WorkingResderSample_copy_20250330193230\WorkingResderSample_copy_20250330193230.ino:3:
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Constants.h:7:8: error: use of enum 'PCD_Register' without previous declaration
7 | enum PCD_Register : byte {
| ^~~~~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Constants.h:7:23: error: reference to 'byte' is ambiguous
7 | enum PCD_Register : byte {
| ^~~~
In file included from C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/bits/memory_resource.h:38,
from C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/unordered_map:50,
from C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/functional:63,
from C:\Users\ubear\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3\cores\esp32/HardwareSerial.h:49,
from C:\Users\ubear\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3\cores\esp32/Arduino.h:203,
from C:\Users\ubear\AppData\Local\Temp\arduino\sketches\6B7CC7A985EF2B649C6C0BAC3BF3E922\sketch\WorkingResderSample_copy_20250330193230.ino.cpp:1:
C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/cstddef:69:14: note: candidates are: 'enum class std::byte'
69 | enum class byte : unsigned char {};
| ^~~~
C:\Users\ubear\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3\cores\esp32/Arduino.h:152:17: note: 'typedef uint8_t byte'
152 | typedef uint8_t byte;
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Constants.h:7:28: error: default member initializer for unnamed bit-field
7 | enum PCD_Register : byte {
| ^
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Constants.h:82:8: error: use of enum 'PCD_Command' without previous declaration
82 | enum PCD_Command : byte {
| ^~~~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Constants.h:82:22: error: reference to 'byte' is ambiguous
82 | enum PCD_Command : byte {
| ^~~~
C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/cstddef:69:14: note: candidates are: 'enum class std::byte'
69 | enum class byte : unsigned char {};
| ^~~~
C:\Users\ubear\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3\cores\esp32/Arduino.h:152:17: note: 'typedef uint8_t byte'
152 | typedef uint8_t byte;
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Constants.h:82:27: error: default member initializer for unnamed bit-field
82 | enum PCD_Command : byte {
| ^
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Constants.h:97:8: error: use of enum 'PCD_RxGain' without previous declaration
97 | enum PCD_RxGain : byte {
| ^~~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Constants.h:97:21: error: reference to 'byte' is ambiguous
97 | enum PCD_RxGain : byte {
| ^~~~
C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/cstddef:69:14: note: candidates are: 'enum class std::byte'
69 | enum class byte : unsigned char {};
| ^~~~
C:\Users\ubear\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3\cores\esp32/Arduino.h:152:17: note: 'typedef uint8_t byte'
152 | typedef uint8_t byte;
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Constants.h:97:26: error: default member initializer for unnamed bit-field
97 | enum PCD_RxGain : byte {
| ^
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Constants.h:112:8: error: use of enum 'PCD_Version' without previous declaration
112 | enum PCD_Version : byte {
| ^~~~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Constants.h:112:22: error: reference to 'byte' is ambiguous
112 | enum PCD_Version : byte {
| ^~~~
C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/cstddef:69:14: note: candidates are: 'enum class std::byte'
69 | enum class byte : unsigned char {};
| ^~~~
C:\Users\ubear\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3\cores\esp32/Arduino.h:152:17: note: 'typedef uint8_t byte'
152 | typedef uint8_t byte;
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Constants.h:112:27: error: default member initializer for unnamed bit-field
112 | enum PCD_Version : byte {
| ^
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Constants.h:124:8: error: use of enum 'PICC_Command' without previous declaration
124 | enum PICC_Command : byte {
| ^~~~~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Constants.h:124:23: error: reference to 'byte' is ambiguous
124 | enum PICC_Command : byte {
| ^~~~
C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/cstddef:69:14: note: candidates are: 'enum class std::byte'
69 | enum class byte : unsigned char {};
| ^~~~
C:\Users\ubear\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3\cores\esp32/Arduino.h:152:17: note: 'typedef uint8_t byte'
152 | typedef uint8_t byte;
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Constants.h:124:28: error: default member initializer for unnamed bit-field
124 | enum PICC_Command : byte {
| ^
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Constants.h:158:8: error: use of enum 'PICC_Type' without previous declaration
158 | enum PICC_Type : byte {
| ^~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Constants.h:158:20: error: reference to 'byte' is ambiguous
158 | enum PICC_Type : byte {
| ^~~~
C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/cstddef:69:14: note: candidates are: 'enum class std::byte'
69 | enum class byte : unsigned char {};
| ^~~~
C:\Users\ubear\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3\cores\esp32/Arduino.h:152:17: note: 'typedef uint8_t byte'
152 | typedef uint8_t byte;
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Constants.h:158:25: error: default member initializer for unnamed bit-field
158 | enum PICC_Type : byte {
| ^
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Constants.h:174:8: error: use of enum 'StatusCode' without previous declaration
174 | enum StatusCode : byte {
| ^~~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Constants.h:174:21: error: reference to 'byte' is ambiguous
174 | enum StatusCode : byte {
| ^~~~
C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/cstddef:69:14: note: candidates are: 'enum class std::byte'
69 | enum class byte : unsigned char {};
| ^~~~
C:\Users\ubear\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3\cores\esp32/Arduino.h:152:17: note: 'typedef uint8_t byte'
152 | typedef uint8_t byte;
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Constants.h:174:26: error: default member initializer for unnamed bit-field
174 | enum StatusCode : byte {
| ^
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Constants.h:189:7: error: reference to 'byte' is ambiguous
189 | byte size; // Number of bytes in the UID. 4, 7 or 10.
| ^~~~
C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/cstddef:69:14: note: candidates are: 'enum class std::byte'
69 | enum class byte : unsigned char {};
| ^~~~
C:\Users\ubear\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3\cores\esp32/Arduino.h:152:17: note: 'typedef uint8_t byte'
152 | typedef uint8_t byte;
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Constants.h:190:7: error: reference to 'byte' is ambiguous
190 | byte uidByte[10];
| ^~~~
C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/cstddef:69:14: note: candidates are: 'enum class std::byte'
69 | enum class byte : unsigned char {};
| ^~~~
C:\Users\ubear\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3\cores\esp32/Arduino.h:152:17: note: 'typedef uint8_t byte'
152 | typedef uint8_t byte;
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Constants.h:191:7: error: reference to 'byte' is ambiguous
191 | byte sak; // The SAK (Select acknowledge) byte returned from the PICC after successful selection.
| ^~~~
C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/cstddef:69:14: note: candidates are: 'enum class std::byte'
69 | enum class byte : unsigned char {};
| ^~~~
C:\Users\ubear\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3\cores\esp32/Arduino.h:152:17: note: 'typedef uint8_t byte'
152 | typedef uint8_t byte;
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Constants.h:196:7: error: reference to 'byte' is ambiguous
196 | byte keyByte[MIFARE_Misc::MF_KEY_SIZE];
| ^~~~
C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/cstddef:69:14: note: candidates are: 'enum class std::byte'
69 | enum class byte : unsigned char {};
| ^~~~
C:\Users\ubear\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3\cores\esp32/Arduino.h:152:17: note: 'typedef uint8_t byte'
152 | typedef uint8_t byte;
| ^~~~
In file included from C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:19:
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Driver.h:14:42: error: 'PCD_Register' in 'class MFRC522Constants' does not name a type
14 | using PCD_Register = MFRC522Constants::PCD_Register;
| ^~~~~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Driver.h:24:40: error: 'PCD_Register' does not name a type; did you mean 'register'?
24 | virtual void PCD_WriteRegister(const PCD_Register reg, const byte value) = 0;
| ^~~~~~~~~~~~
| register
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Driver.h:24:64: error: reference to 'byte' is ambiguous
24 | virtual void PCD_WriteRegister(const PCD_Register reg, const byte value) = 0;
| ^~~~
C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/cstddef:69:14: note: candidates are: 'enum class std::byte'
69 | enum class byte : unsigned char {};
| ^~~~
C:\Users\ubear\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3\cores\esp32/Arduino.h:152:17: note: 'typedef uint8_t byte'
152 | typedef uint8_t byte;
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Driver.h:25:40: error: 'PCD_Register' does not name a type; did you mean 'register'?
25 | virtual void PCD_WriteRegister(const PCD_Register reg, const byte count, byte *const values) = 0;
| ^~~~~~~~~~~~
| register
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Driver.h:25:64: error: reference to 'byte' is ambiguous
25 | virtual void PCD_WriteRegister(const PCD_Register reg, const byte count, byte *const values) = 0;
| ^~~~
C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/cstddef:69:14: note: candidates are: 'enum class std::byte'
69 | enum class byte : unsigned char {};
| ^~~~
C:\Users\ubear\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3\cores\esp32/Arduino.h:152:17: note: 'typedef uint8_t byte'
152 | typedef uint8_t byte;
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Driver.h:25:76: error: reference to 'byte' is ambiguous
25 | virtual void PCD_WriteRegister(const PCD_Register reg, const byte count, byte *const values) = 0;
| ^~~~
C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/cstddef:69:14: note: candidates are: 'enum class std::byte'
69 | enum class byte : unsigned char {};
| ^~~~
C:\Users\ubear\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3\cores\esp32/Arduino.h:152:17: note: 'typedef uint8_t byte'
152 | typedef uint8_t byte;
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Driver.h:25:76: error: 'byte' has not been declared
25 | virtual void PCD_WriteRegister(const PCD_Register reg, const byte count, byte *const values) = 0;
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Driver.h:26:11: error: reference to 'byte' is ambiguous
26 | virtual byte PCD_ReadRegister(const PCD_Register reg) = 0;
| ^~~~
C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/cstddef:69:14: note: candidates are: 'enum class std::byte'
69 | enum class byte : unsigned char {};
| ^~~~
C:\Users\ubear\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3\cores\esp32/Arduino.h:152:17: note: 'typedef uint8_t byte'
152 | typedef uint8_t byte;
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Driver.h:27:39: error: 'PCD_Register' does not name a type; did you mean 'register'?
27 | virtual void PCD_ReadRegister(const PCD_Register reg, const byte count, byte *const values, const byte rxAlign = 0) = 0;
| ^~~~~~~~~~~~
| register
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Driver.h:27:63: error: reference to 'byte' is ambiguous
27 | virtual void PCD_ReadRegister(const PCD_Register reg, const byte count, byte *const values, const byte rxAlign = 0) = 0;
| ^~~~
C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/cstddef:69:14: note: candidates are: 'enum class std::byte'
69 | enum class byte : unsigned char {};
| ^~~~
C:\Users\ubear\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3\cores\esp32/Arduino.h:152:17: note: 'typedef uint8_t byte'
152 | typedef uint8_t byte;
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Driver.h:27:75: error: reference to 'byte' is ambiguous
27 | virtual void PCD_ReadRegister(const PCD_Register reg, const byte count, byte *const values, const byte rxAlign = 0) = 0;
| ^~~~
C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/cstddef:69:14: note: candidates are: 'enum class std::byte'
69 | enum class byte : unsigned char {};
| ^~~~
C:\Users\ubear\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3\cores\esp32/Arduino.h:152:17: note: 'typedef uint8_t byte'
152 | typedef uint8_t byte;
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Driver.h:27:75: error: 'byte' has not been declared
27 | virtual void PCD_ReadRegister(const PCD_Register reg, const byte count, byte *const values, const byte rxAlign = 0) = 0;
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Driver.h:27:101: error: reference to 'byte' is ambiguous
27 | virtual void PCD_ReadRegister(const PCD_Register reg, const byte count, byte *const values, const byte rxAlign = 0) = 0;
| ^~~~
C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/cstddef:69:14: note: candidates are: 'enum class std::byte'
69 | enum class byte : unsigned char {};
| ^~~~
C:\Users\ubear\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3\cores\esp32/Arduino.h:152:17: note: 'typedef uint8_t byte'
152 | typedef uint8_t byte;
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:28:7: error: reference to 'byte' is ambiguous
28 | const byte MFRC522_firmware_referenceV0_0[]
| ^~~~
C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/cstddef:69:14: note: candidates are: 'enum class std::byte'
69 | enum class byte : unsigned char {};
| ^~~~
C:\Users\ubear\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3\cores\esp32/Arduino.h:152:17: note: 'typedef uint8_t byte'
152 | typedef uint8_t byte;
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:41:7: error: reference to 'byte' is ambiguous
41 | const byte MFRC522_firmware_referenceV1_0[]
| ^~~~
C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/cstddef:69:14: note: candidates are: 'enum class std::byte'
69 | enum class byte : unsigned char {};
| ^~~~
C:\Users\ubear\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3\cores\esp32/Arduino.h:152:17: note: 'typedef uint8_t byte'
152 | typedef uint8_t byte;
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:54:7: error: reference to 'byte' is ambiguous
54 | const byte MFRC522_firmware_referenceV2_0[]
| ^~~~
C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/cstddef:69:14: note: candidates are: 'enum class std::byte'
69 | enum class byte : unsigned char {};
| ^~~~
C:\Users\ubear\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3\cores\esp32/Arduino.h:152:17: note: 'typedef uint8_t byte'
152 | typedef uint8_t byte;
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:67:7: error: reference to 'byte' is ambiguous
67 | const byte FM17522_firmware_reference88[]
| ^~~~
C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/cstddef:69:14: note: candidates are: 'enum class std::byte'
69 | enum class byte : unsigned char {};
| ^~~~
C:\Users\ubear\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3\cores\esp32/Arduino.h:152:17: note: 'typedef uint8_t byte'
152 | typedef uint8_t byte;
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:79:7: error: reference to 'byte' is ambiguous
79 | const byte FM17522_firmware_referenceB2[]
| ^~~~
C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/cstddef:69:14: note: candidates are: 'enum class std::byte'
69 | enum class byte : unsigned char {};
| ^~~~
C:\Users\ubear\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3\cores\esp32/Arduino.h:152:17: note: 'typedef uint8_t byte'
152 | typedef uint8_t byte;
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:91:7: error: reference to 'byte' is ambiguous
91 | const byte FM17522E_firmware_reference[]
| ^~~~
C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/cstddef:69:14: note: candidates are: 'enum class std::byte'
69 | enum class byte : unsigned char {};
| ^~~~
C:\Users\ubear\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3\cores\esp32/Arduino.h:152:17: note: 'typedef uint8_t byte'
152 | typedef uint8_t byte;
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:106:42: error: 'PCD_Register' in 'class MFRC522Constants' does not name a type
106 | using PCD_Register = MFRC522Constants::PCD_Register;
| ^~~~~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:107:40: error: 'PCD_RxGain' in 'class MFRC522Constants' does not name a type
107 | using PCD_RxGain = MFRC522Constants::PCD_RxGain;
| ^~~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:108:42: error: 'PICC_Command' in 'class MFRC522Constants' does not name a type
108 | using PICC_Command = MFRC522Constants::PICC_Command;
| ^~~~~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:110:39: error: 'PICC_Type' in 'class MFRC522Constants' does not name a type
110 | using PICC_Type = MFRC522Constants::PICC_Type;
| ^~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:111:40: error: 'StatusCode' in 'class MFRC522Constants' does not name a type
111 | using StatusCode = MFRC522Constants::StatusCode;
| ^~~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:112:41: error: 'PCD_Command' in 'class MFRC522Constants' does not name a type
112 | using PCD_Command = MFRC522Constants::PCD_Command;
| ^~~~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:113:41: error: 'PCD_Version' in 'class MFRC522Constants' does not name a type
113 | using PCD_Version = MFRC522Constants::PCD_Version;
| ^~~~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:118:20: error: reference to 'byte' is ambiguous
118 | static constexpr byte FIFO_SIZE = 64; // The FIFO is 64 bytes.
| ^~~~
C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/cstddef:69:14: note: candidates are: 'enum class std::byte'
69 | enum class byte : unsigned char {};
| ^~~~
C:\Users\ubear\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3\cores\esp32/Arduino.h:152:17: note: 'typedef uint8_t byte'
152 | typedef uint8_t byte;
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:131:31: error: 'PCD_Register' has not been declared
131 | void PCD_SetRegisterBitMask(PCD_Register reg, byte mask);
| ^~~~~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:131:49: error: reference to 'byte' is ambiguous
131 | void PCD_SetRegisterBitMask(PCD_Register reg, byte mask);
| ^~~~
C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/cstddef:69:14: note: candidates are: 'enum class std::byte'
69 | enum class byte : unsigned char {};
| ^~~~
C:\Users\ubear\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3\cores\esp32/Arduino.h:152:17: note: 'typedef uint8_t byte'
152 | typedef uint8_t byte;
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:131:49: error: 'byte' has not been declared
131 | void PCD_SetRegisterBitMask(PCD_Register reg, byte mask);
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:132:33: error: 'PCD_Register' has not been declared
132 | void PCD_ClearRegisterBitMask(PCD_Register reg, byte mask);
| ^~~~~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:132:51: error: reference to 'byte' is ambiguous
132 | void PCD_ClearRegisterBitMask(PCD_Register reg, byte mask);
| ^~~~
C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/cstddef:69:14: note: candidates are: 'enum class std::byte'
69 | enum class byte : unsigned char {};
| ^~~~
C:\Users\ubear\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3\cores\esp32/Arduino.h:152:17: note: 'typedef uint8_t byte'
152 | typedef uint8_t byte;
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:132:51: error: 'byte' has not been declared
132 | void PCD_ClearRegisterBitMask(PCD_Register reg, byte mask);
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:133:3: error: 'StatusCode' does not name a type
133 | StatusCode PCD_CalculateCRC(byte *data, byte length, byte *result);
| ^~~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:142:3: error: reference to 'byte' is ambiguous
142 | byte PCD_GetAntennaGain();
| ^~~~
C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/cstddef:69:14: note: candidates are: 'enum class std::byte'
69 | enum class byte : unsigned char {};
| ^~~~
C:\Users\ubear\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3\cores\esp32/Arduino.h:152:17: note: 'typedef uint8_t byte'
152 | typedef uint8_t byte;
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:143:27: error: reference to 'byte' is ambiguous
143 | void PCD_SetAntennaGain(byte mask);
| ^~~~
C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/cstddef:69:14: note: candidates are: 'enum class std::byte'
69 | enum class byte : unsigned char {};
| ^~~~
C:\Users\ubear\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3\cores\esp32/Arduino.h:152:17: note: 'typedef uint8_t byte'
152 | typedef uint8_t byte;
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:143:27: error: 'byte' has not been declared
143 | void PCD_SetAntennaGain(byte mask);
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:145:3: error: 'PCD_Version' does not name a type
145 | PCD_Version PCD_GetVersion();
| ^~~~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:157:3: error: 'StatusCode' does not name a type
157 | StatusCode PCD_TransceiveData(byte *sendData, byte sendLen, byte *backData, byte *backLen, byte *validBits = nullptr, byte rxAlign = 0, bool checkCRC = false);
| ^~~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:158:3: error: 'StatusCode' does not name a type
158 | StatusCode PCD_CommunicateWithPICC(byte command, byte waitIRq, byte *sendData, byte sendLen, byte *backData = nullptr, byte *backLen = nullptr, byte *validBits = nullptr, byte rxAlign = 0, bool checkCRC = false);
| ^~~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:159:3: error: 'StatusCode' does not name a type
159 | StatusCode PICC_RequestA(byte *bufferATQA, byte *bufferSize);
| ^~~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:160:3: error: 'StatusCode' does not name a type
160 | StatusCode PICC_WakeupA(byte *bufferATQA, byte *bufferSize);
| ^~~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:161:3: error: 'StatusCode' does not name a type
161 | StatusCode PICC_REQA_or_WUPA(byte command, byte *bufferATQA, byte *bufferSize);
| ^~~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:162:11: error: 'StatusCode' does not name a type
162 | virtual StatusCode PICC_Select(Uid *uid, byte validBits = 0);
| ^~~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:163:3: error: 'StatusCode' does not name a type
163 | StatusCode PICC_HaltA();
| ^~~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:168:3: error: 'StatusCode' does not name a type
168 | StatusCode PCD_Authenticate(byte command, byte blockAddr, MIFARE_Key *key, Uid *uid);
| ^~~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:170:3: error: 'StatusCode' does not name a type
170 | StatusCode MIFARE_Read(byte blockAddr, byte *buffer, byte *bufferSize);
| ^~~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:171:3: error: 'StatusCode' does not name a type
171 | StatusCode MIFARE_Write(byte blockAddr, byte *buffer, byte bufferSize);
| ^~~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:172:3: error: 'StatusCode' does not name a type
172 | StatusCode MIFARE_Ultralight_Write(byte page, byte *buffer, byte bufferSize);
| ^~~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:173:3: error: 'StatusCode' does not name a type
173 | StatusCode MIFARE_Decrement(byte blockAddr, int32_t delta);
| ^~~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:174:3: error: 'StatusCode' does not name a type
174 | StatusCode MIFARE_Increment(byte blockAddr, int32_t delta);
| ^~~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:175:3: error: 'StatusCode' does not name a type
175 | StatusCode MIFARE_Restore(byte blockAddr);
| ^~~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:176:3: error: 'StatusCode' does not name a type
176 | StatusCode MIFARE_Transfer(byte blockAddr);
| ^~~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:177:3: error: 'StatusCode' does not name a type
177 | StatusCode MIFARE_GetValue(byte blockAddr, int32_t *value);
| ^~~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:178:3: error: 'StatusCode' does not name a type
178 | StatusCode MIFARE_SetValue(byte blockAddr, int32_t value);
| ^~~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:179:3: error: 'StatusCode' does not name a type
179 | StatusCode PCD_NTAG216_AUTH(const byte password[4], byte pACK[]);
| ^~~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:184:3: error: 'StatusCode' does not name a type
184 | StatusCode PCD_MIFARE_Transceive(byte *sendData, byte sendLen, bool acceptTimeout = false);
| ^~~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:185:10: error: 'PICC_Type' does not name a type
185 | static PICC_Type PICC_GetType(byte sak);
| ^~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:188:35: error: reference to 'byte' is ambiguous
188 | void MIFARE_CalculateAccessBits(byte accessBitBuffer[3], const byte g0, const byte g1, const byte g2, const byte g3) const;
| ^~~~
C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/cstddef:69:14: note: candidates are: 'enum class std::byte'
69 | enum class byte : unsigned char {};
| ^~~~
C:\Users\ubear\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3\cores\esp32/Arduino.h:152:17: note: 'typedef uint8_t byte'
152 | typedef uint8_t byte;
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:188:35: error: 'byte' has not been declared
188 | void MIFARE_CalculateAccessBits(byte accessBitBuffer[3], const byte g0, const byte g1, const byte g2, const byte g3) const;
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:188:66: error: reference to 'byte' is ambiguous
188 | void MIFARE_CalculateAccessBits(byte accessBitBuffer[3], const byte g0, const byte g1, const byte g2, const byte g3) const;
| ^~~~
C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/cstddef:69:14: note: candidates are: 'enum class std::byte'
69 | enum class byte : unsigned char {};
| ^~~~
C:\Users\ubear\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3\cores\esp32/Arduino.h:152:17: note: 'typedef uint8_t byte'
152 | typedef uint8_t byte;
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:188:81: error: reference to 'byte' is ambiguous
188 | void MIFARE_CalculateAccessBits(byte accessBitBuffer[3], const byte g0, const byte g1, const byte g2, const byte g3) const;
| ^~~~
C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/cstddef:69:14: note: candidates are: 'enum class std::byte'
69 | enum class byte : unsigned char {};
| ^~~~
C:\Users\ubear\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3\cores\esp32/Arduino.h:152:17: note: 'typedef uint8_t byte'
152 | typedef uint8_t byte;
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:188:96: error: reference to 'byte' is ambiguous
188 | void MIFARE_CalculateAccessBits(byte accessBitBuffer[3], const byte g0, const byte g1, const byte g2, const byte g3) const;
| ^~~~
C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/cstddef:69:14: note: candidates are: 'enum class std::byte'
69 | enum class byte : unsigned char {};
| ^~~~
C:\Users\ubear\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3\cores\esp32/Arduino.h:152:17: note: 'typedef uint8_t byte'
152 | typedef uint8_t byte;
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:188:111: error: reference to 'byte' is ambiguous
188 | void MIFARE_CalculateAccessBits(byte accessBitBuffer[3], const byte g0, const byte g1, const byte g2, const byte g3) const;
| ^~~~
C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/cstddef:69:14: note: candidates are: 'enum class std::byte'
69 | enum class byte : unsigned char {};
| ^~~~
C:\Users\ubear\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3\cores\esp32/Arduino.h:152:17: note: 'typedef uint8_t byte'
152 | typedef uint8_t byte;
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522v2.h:200:3: error: 'StatusCode' does not name a type
200 | StatusCode MIFARE_TwoStepHelper(byte command, byte blockAddr, int32_t data);
| ^~~~~~~~~~
In file included from C:\Users\ubear\OneDrive\ESP Boards\WorkingResderSample_copy_20250330193230\WorkingResderSample_copy_20250330193230.ino:4:
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522DriverSPI.h:20:32: error: 'PCD_Register' does not name a type; did you mean 'register'?
20 | void PCD_WriteRegister(const PCD_Register reg, const byte value) override;
| ^~~~~~~~~~~~
| register
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522DriverSPI.h:20:56: error: reference to 'byte' is ambiguous
20 | void PCD_WriteRegister(const PCD_Register reg, const byte value) override;
| ^~~~
C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/cstddef:69:14: note: candidates are: 'enum class std::byte'
69 | enum class byte : unsigned char {};
| ^~~~
C:\Users\ubear\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3\cores\esp32/Arduino.h:152:17: note: 'typedef uint8_t byte'
152 | typedef uint8_t byte;
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522DriverSPI.h:21:32: error: 'PCD_Register' does not name a type; did you mean 'register'?
21 | void PCD_WriteRegister(const PCD_Register reg, const byte count, byte *const values) override;
| ^~~~~~~~~~~~
| register
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522DriverSPI.h:21:56: error: reference to 'byte' is ambiguous
21 | void PCD_WriteRegister(const PCD_Register reg, const byte count, byte *const values) override;
| ^~~~
C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/cstddef:69:14: note: candidates are: 'enum class std::byte'
69 | enum class byte : unsigned char {};
| ^~~~
C:\Users\ubear\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3\cores\esp32/Arduino.h:152:17: note: 'typedef uint8_t byte'
152 | typedef uint8_t byte;
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522DriverSPI.h:21:68: error: reference to 'byte' is ambiguous
21 | void PCD_WriteRegister(const PCD_Register reg, const byte count, byte *const values) override;
| ^~~~
C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/cstddef:69:14: note: candidates are: 'enum class std::byte'
69 | enum class byte : unsigned char {};
| ^~~~
C:\Users\ubear\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3\cores\esp32/Arduino.h:152:17: note: 'typedef uint8_t byte'
152 | typedef uint8_t byte;
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522DriverSPI.h:21:68: error: 'byte' has not been declared
21 | void PCD_WriteRegister(const PCD_Register reg, const byte count, byte *const values) override;
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522DriverSPI.h:22:3: error: reference to 'byte' is ambiguous
22 | byte PCD_ReadRegister(const PCD_Register reg) override;
| ^~~~
C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/cstddef:69:14: note: candidates are: 'enum class std::byte'
69 | enum class byte : unsigned char {};
| ^~~~
C:\Users\ubear\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3\cores\esp32/Arduino.h:152:17: note: 'typedef uint8_t byte'
152 | typedef uint8_t byte;
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522DriverSPI.h:23:31: error: 'PCD_Register' does not name a type; did you mean 'register'?
23 | void PCD_ReadRegister(const PCD_Register reg, const byte count, byte *const values, const byte rxAlign = 0) override;
| ^~~~~~~~~~~~
| register
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522DriverSPI.h:23:55: error: reference to 'byte' is ambiguous
23 | void PCD_ReadRegister(const PCD_Register reg, const byte count, byte *const values, const byte rxAlign = 0) override;
| ^~~~
C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/cstddef:69:14: note: candidates are: 'enum class std::byte'
69 | enum class byte : unsigned char {};
| ^~~~
C:\Users\ubear\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3\cores\esp32/Arduino.h:152:17: note: 'typedef uint8_t byte'
152 | typedef uint8_t byte;
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522DriverSPI.h:23:67: error: reference to 'byte' is ambiguous
23 | void PCD_ReadRegister(const PCD_Register reg, const byte count, byte *const values, const byte rxAlign = 0) override;
| ^~~~
C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/cstddef:69:14: note: candidates are: 'enum class std::byte'
69 | enum class byte : unsigned char {};
| ^~~~
C:\Users\ubear\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3\cores\esp32/Arduino.h:152:17: note: 'typedef uint8_t byte'
152 | typedef uint8_t byte;
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522DriverSPI.h:23:67: error: 'byte' has not been declared
23 | void PCD_ReadRegister(const PCD_Register reg, const byte count, byte *const values, const byte rxAlign = 0) override;
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522DriverSPI.h:23:93: error: reference to 'byte' is ambiguous
23 | void PCD_ReadRegister(const PCD_Register reg, const byte count, byte *const values, const byte rxAlign = 0) override;
| ^~~~
C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/cstddef:69:14: note: candidates are: 'enum class std::byte'
69 | enum class byte : unsigned char {};
| ^~~~
C:\Users\ubear\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3\cores\esp32/Arduino.h:152:17: note: 'typedef uint8_t byte'
152 | typedef uint8_t byte;
| ^~~~
In file included from C:\Users\ubear\OneDrive\ESP Boards\WorkingResderSample_copy_20250330193230\WorkingResderSample_copy_20250330193230.ino:6:
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Debug.h:10:40: error: 'StatusCode' in 'class MFRC522Constants' does not name a type
10 | using StatusCode = MFRC522Constants::StatusCode;
| ^~~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Debug.h:11:39: error: 'PICC_Type' in 'class MFRC522Constants' does not name a type
11 | using PICC_Type = MFRC522Constants::PICC_Type;
| ^~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Debug.h:12:42: error: 'PICC_Command' in 'class MFRC522Constants' does not name a type
12 | using PICC_Command = MFRC522Constants::PICC_Command;
| ^~~~~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Debug.h:13:41: error: 'PCD_Version' in 'class MFRC522Constants' does not name a type
13 | using PCD_Version = MFRC522Constants::PCD_Version;
| ^~~~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Debug.h:19:54: error: 'PICC_Type' has not been declared
19 | static const __FlashStringHelper *PICC_GetTypeName(PICC_Type type);
| ^~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Debug.h:20:55: error: 'StatusCode' has not been declared
20 | static const __FlashStringHelper *GetStatusCodeName(StatusCode code);
| ^~~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Debug.h:30:90: error: 'PICC_Type' has not been declared
30 | static void PICC_DumpMifareClassicToSerial(MFRC522 &device, Print &logPrint, Uid *uid, PICC_Type piccType, MIFARE_Key *key);
| ^~~~~~~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Debug.h:31:113: error: reference to 'byte' is ambiguous
31 | static void PICC_DumpMifareClassicSectorToSerial(MFRC522 &device, Print &logPrint, Uid *uid, MIFARE_Key *key, byte sector);
| ^~~~
C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/cstddef:69:14: note: candidates are: 'enum class std::byte'
69 | enum class byte : unsigned char {};
| ^~~~
C:\Users\ubear\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3\cores\esp32/Arduino.h:152:17: note: 'typedef uint8_t byte'
152 | typedef uint8_t byte;
| ^~~~
C:\Users\ubear\Documents\Arduino\libraries\RFID_MFRC522v2\src/MFRC522Debug.h:31:113: error: 'byte' has not been declared
31 | static void PICC_DumpMifareClassicSectorToSerial(MFRC522 &device, Print &logPrint, Uid *uid, MIFARE_Key *key, byte sector);
| ^~~~
C:\Users\ubear\OneDrive\ESP Boards\WorkingResderSample_copy_20250330193230\WorkingResderSample_copy_20250330193230.ino: In function 'void loop()':
C:\Users\ubear\OneDrive\ESP Boards\WorkingResderSample_copy_20250330193230\WorkingResderSample_copy_20250330193230.ino:72:8: error: reference to 'byte' is ambiguous
72 | for (byte i = 0; i < mfrc522.uid.size; i++) {
| ^~~~
C:/Users/ubear/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/xtensa-esp-elf/include/c++/13.2.0/cstddef:69:14: note: candidates are: 'enum class std::byte'
69 | enum class byte : unsigned char {};
| ^~~~
C:\Users\ubear\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3\cores\esp32/Arduino.h:152:17: note: 'typedef uint8_t byte'
152 | typedef uint8_t byte;
| ^~~~
C:\Users\ubear\OneDrive\ESP Boards\WorkingResderSample_copy_20250330193230\WorkingResderSample_copy_20250330193230.ino:72:20: error: 'i' was not declared in this scope
72 | for (byte i = 0; i < mfrc522.uid.size; i++) {
| ^
C:\Users\ubear\OneDrive\ESP Boards\WorkingResderSample_copy_20250330193230\WorkingResderSample_copy_20250330193230.ino:72:36: error: 'using MFRC522::Uid = struct MFRC522Constants::Uid' {aka 'struct MFRC522Constants::Uid'} has no member named 'size'
72 | for (byte i = 0; i < mfrc522.uid.size; i++) {
| ^~~~
C:\Users\ubear\OneDrive\ESP Boards\WorkingResderSample_copy_20250330193230\WorkingResderSample_copy_20250330193230.ino:73:21: error: 'using MFRC522::Uid = struct MFRC522Constants::Uid' {aka 'struct MFRC522Constants::Uid'} has no member named 'uidByte'
73 | if (mfrc522.uid.uidByte[i] < 0x10) {
| ^~~~~~~
C:\Users\ubear\OneDrive\ESP Boards\WorkingResderSample_copy_20250330193230\WorkingResderSample_copy_20250330193230.ino:76:37: error: 'using MFRC522::Uid = struct MFRC522Constants::Uid' {aka 'struct MFRC522Constants::Uid'} has no member named 'uidByte'
76 | uidString += String(mfrc522.uid.uidByte[i], HEX);
| ^~~~~~~
exit status 1
Compilation error: reference to 'byte' is ambiguous
Esp32 Dev module (4mb)
Please provide a link to the source of this library.
As you say, the version without that #include compiles successfully.
That is added automatically when you add ESP32-audioI2S to the sketch. Again, this is a truncated sketch to isolate what was giving me the error since it previously worked with no error. This is the link to the library.
https://github.com/schreibfaul1/ESP32-audioI2S.git
The full sketch is to swipe rfid cards or tags and if allowed play a certain sound from sd card and run a small light show. Each card would have different sound and show.
I went to the github page you referenced and downloaded the zip of the library, and then used the library manager to add the zip file.
Your sketch compiles successfully for me with both IDE 1.8.19 and 2.3.4. They are using ESP32 core 3.1.0.
I notice that you were using 3.1.3 so there may be some issue with the latest changes to the esp 32 core.
I had tried that but will try again. Maybe I went back on too many things at once.
Thanks.
Your sketch compiles successfully with core 3.2.0.
My recommendation would be to remove and reinstall the audioI2S library.
Ok, I just reverted back to 3.1.0 and i get the same error. let me try to re install that library.
It worked now. I re-installed the library from zip and not IDE and this worked. I had uninstalled and re-installed from within IDE and had the same result. Didn't think from zip would be different. Thanks again. Hopefully I could finish this project now.
The version from the library git page is 3.0.12 with a release date of July 29, 2024.
The version in the Library Manger is 3.0.13. In fact, the Library Manager only shows version 2.0 and 3.0.13 as available versions. I would report this as a bug.
EDIT: It has been reported as a bug in the library but probably needs to be reported as a bug against the Arduino Library Manager.
https://github.com/schreibfaul1/ESP32-audioI2S/issues/1001
There is also a release version 3.1 through the git page which produces the same error.
Hi @ubear7.
The library developer has already made a fix for the bug that caused these errors. The fix was made after the time of the latest release of the library, so this is why you still experienced it when you installed the latest release version via the Arduino IDE Library Manager.
As you discovered, the solution is to install the development version of the library which has the fix.
As mentioned before the posted code was truncated to find the error. Now that we found it this is the entire code. Now it says it's too long. However, I have an exact board running this code with only difference being the MFRC522 library instead of the MFRC522v2. The reason I changed to the MFRC522v2 library is that I get the same error stating it's too long. Is there a way to figure out exactly what parts of the library are needed in order to shorten what is loaded into memory. As a matter of fact, on that other board I'm trying to re-create the code was longer as I had one more rfid tag with it's own led show and if I remember correctly still had room on the board.
```cpp
#include <Adafruit_NeoPixel.h>
#include <Audio.h>
#include "SD.h"
#include "FS.h"
#include <MFRC522v2.h>
#include <MFRC522DriverSPI.h>
#include <MFRC522DriverPinSimple.h>
#include <MFRC522Debug.h>
// Led Setup
#define PIN 12
#define PIN2 13
#define I2S_DOUT 25
#define I2S_BCLK 27
#define I2S_LRC 26
Adafruit_NeoPixel strip = Adafruit_NeoPixel(12, PIN, NEO_GRB + NEO_KHZ800);
Adafruit_NeoPixel strip2 = Adafruit_NeoPixel(12, PIN2, NEO_GRB + NEO_KHZ800);
// SPI and RFID setup
MFRC522DriverPinSimple ss_pin(5); // Create pin driver. See typical pin layout above.
#define RST_PIN 15
#define SPI_MOSI 23 // SD Card
#define SPI_MISO 19
#define SPI_SCK 18
#define SD_CS 17
SPIClass &spiClass = SPI; // Alternative SPI e.g. SPI2 or from library e.g. softwarespi.
Audio audio;
const SPISettings spiSettings = SPISettings(SPI_CLOCK_DIV4, MSBFIRST, SPI_MODE0); // May have to be set if hardware is not fully compatible to Arduino specifications.
MFRC522DriverSPI driver{ ss_pin, spiClass, spiSettings }; // Create SPI driver.
MFRC522 mfrc522{ driver }; // Create MFRC522 instance.
void setup() {
Serial.begin(115200); // Initialize serial communications with the PC for debugging.
while (!Serial)
; // Do nothing if no serial port is opened (added for Arduinos based on ATMEGA32U4).
mfrc522.PCD_Init(); // Init MFRC522 board.
// LED
strip.begin();
strip2.begin();
strip.setBrightness(15);
strip2.setBrightness(15);
strip.show(); // Initialize all pixels to 'off'
strip2.show(); // Initialize all pixels to 'off'
//Audio
pinMode(SD_CS, OUTPUT);
digitalWrite(SD_CS, HIGH);
if (!SD.begin(SD_CS)) {
while (true)
;
}
audio.setPinout(I2S_BCLK, I2S_LRC, I2S_DOUT);
}
// Fill the dots one after the other with a color
void colorWipe(uint32_t c, uint8_t wait) {
for (uint16_t i = 0; i < strip.numPixels(); i++) {
strip.setPixelColor(i, c);
strip.show();
delay(wait);
}
}
void colorWipe2(uint32_t c, uint8_t wait) {
for (int i = strip2.numPixels(); i >= 0; i--) {
strip2.setPixelColor(i, c);
strip2.show();
delay(wait);
}
}
void loop() {
audio.loop();
if (!mfrc522.PICC_IsNewCardPresent() || !mfrc522.PICC_ReadCardSerial()) {
return;
}
Serial.print("Card UID: ");
//MFRC522Debug::PrintUID(Serial, (mfrc522.uid));
//Serial.println();
// Save the UID on a String variable
String uidString = "";
for (byte i = 0; i < mfrc522.uid.size; i++) {
if (mfrc522.uid.uidByte[i] < 0x10) {
uidString += "0";
}
uidString += String(mfrc522.uid.uidByte[i], HEX);
}
Serial.println(uidString);
if (uidString == "93abe51a") {
audio.setVolume(21); // 0...21
audio.connecttoFS(SD, "/Foolish.wav");
Serial.println(F("Access Granted Pink"));
colorWipe(strip.Color(0, 255, 0), 60), colorWipe2(strip2.Color(0, 255, 0), 60);
colorWipe(strip.Color(0, 0, 0), 1), colorWipe2(strip2.Color(0, 0, 0), 1);
} else if (uidString == "187a3999") {
audio.setVolume(21); // 0...21
audio.connecttoFS(SD, "/VaderWaiting.wav");
Serial.println(F("Access Granted Grey"));
colorWipe(strip.Color(0, 0, 255), 60), colorWipe2(strip2.Color(0, 0, 255), 60);
colorWipe(strip.Color(0, 0, 0), 1), colorWipe2(strip2.Color(0, 0, 0), 1);
} else {
audio.setVolume(21); // 0...21
audio.connecttoFS(SD, "/comeback.wav");
Serial.println(F("Access Denied"));
colorWipe(strip.Color(255, 0, 0), 60), colorWipe2(strip2.Color(255, 0, 0), 60);
colorWipe(strip.Color(0, 0, 0), 1), colorWipe2(strip2.Color(0, 0, 0), 1);
}
}

