I'm using a NodeMcu for my project and am running out of pins to use. I have a MFRC522 Module, IR Receiver, Buzzer and RGB LED connected. I am facing the problem that whenever I start scanning for RFID tags with the MFRC522 module, the onboard LED starts flashing very fast and the RGB LED changes to an undefined color.
I looked up the pin definitions of the NodeMcu, but couldn't quite find information on what pins I can use for this and which I can't, and why this only happens once I start up the RFID reader.
I found this pin layout image, as well as the datasheet.
The code shouldn't be really relevant since it works before starting the RFID reader, but here is the setup of the reader, just in case:
#define SS_PIN D4 // SPI - Slave Select Pin
#define RST_PIN D2 // SPI - Reset Pin - not actually connected
MFRC522 mfrc522(SS_PIN, RST_PIN);
// Initial setup for SPI and MFRC522
bool rfidSetupCompleted = false;
void setupReader()
{
SPI.begin();
mfrc522.PCD_Init();
rfidSetupCompleted = true;
}
These are the pin definitions of the RGB LED:
#define LED_BLUE D8
#define LED_GREEN D3
#define LED_RED D2
Any help is highly appreciated! I'm assuming I am using a pin that is used for other purposes (such as maybe D8), but I can't figure out which, and why. I did try to change up the pins and switched D0 and D8 (buzzer and one LED pin), but without luck. I also tried disconnecting each LED pin separately, but didn't learn anything from that either.