Closed dageci closed 1 year ago
Maybe I have wrongly wired ESP32 & RC522. In another forum I have find out that I can't use all the GPIO's for RS522.
I'm new to this, if you could take a look if this is ok what I have connected. I'm using an ESP32 D1 mini
And my wiring is:
RC522 > ESP32
SDA > I05 SCK > I018 MOSI > I023 MISO > I019 IRQ GND > GND RST > I022 3v3 > 3v3
Is that ok?
You are right. On ESP boards you can not use any pin. There are a few ambiguities and stumbles with the pins.
If the setup works than all good 👍
A recommendable overview is from Andreas Spiess on YT: https://www.youtube.com/watch?v=LY-1DHTxRAk
Step 1: Describe your environment
Step 2: Describe the problem
Sometimes it works and sometimes it doesn't pass the testing of PICC_IsNewCardPresent when I restart the power.
I have added the esp32 led on of to see if it pass this if block:
Sometimes, when it works the led blinks, but sometimes when I switch the power off and then back on, it doesn't pass.
When I put the led blinking inside this if block it is blinking:
So I'm not sure if my code is wrong, or is there something else?
Relevant Code: