Closed Humancell closed 6 years ago
I had some issues while defining the SS_PIN and RST_PINs without the "D" next to the pin number. So D4 / D5 instead of using 4 / 5 worked for me.
@Kruziolo he is using ESP-12F SoC and not the WeMos or NodeMCU board... @Humancell try to compare your code with my example: https://github.com/Jorgen-VikingGod/ESP8266-MFRC522
I'll try both solutions. I just found a post where someone said that using the D5/GPIO5 for RST will not work. When I disconnected that pin I got things working.
@Jorgen-VikingGod I have looked at your code, etc. and you seem to be using GPIO5 in your code ... except in the wiring where you say to use GPIO2 and GPIO15.
https://github.com/Jorgen-VikingGod/ESP8266-MFRC522/blob/master/MFRC522-ESP8266_wiring.png
I'm going to try and move RST to GPIO15 and see if that works better.
@Humancell sorry I did not update the wiring diagram. This worked for me in the beginning; but it seams that not all ESP chips are same. So some people had trouble of using the wiring from the diagram. Please try it out - maybe it worked for you; but change the SS pin to GPIO15 and RST to GPIO02 or other free pin.
@Humancell : @Jorgen-VikingGod 's solution worked for me, but I used RST to GPIO0, instead GPIO2. I have a Wemos D1 R2. Thanks for the solution.
@Humancell , @Jorgen-VikingGod A further potential problem using the MFRC522 library arises from the baud rate. In your code, you're using 9600 which is way to slow to empty the buffer created by the "DumpToSerial"-Routines. For me, increasing the baud rate to 115200 worked out (totally fine with your ESP board) and avoided any soft wdt resets....
@tomrit you are absolutely right. Higher serial baud rate is a good choice! Most example sketches uses 9600, because of the slow and old arduino boards. The ESP can handle much higher baud rate with that powerful MCU.
Don't confuse the D numbering with GPIO numbering. And different boards have different pins free for user applications. And yes, the ESP usually has trouble with low baud rates, because the WDT tends to trigger (sending data takes way too long). This is a 3rd party lib, and 3rd party hardware. In addition, several comments state success in various ways. Closing.
Please fill the info fields, it helps to get you faster support ;)
if you have a stack dump decode it: https://github.com/esp8266/Arduino/blob/master/doc/Troubleshooting/stack_dump.md
for better debug messages: https://github.com/esp8266/Arduino/blob/master/doc/Troubleshooting/debugging.md
----------------------------- Remove above -----------------------------
Basic Info
Hardware
Hardware: ?ESP-12F? Core Version: ?2.3.0?
Description
I'm using the ESP-12F, and am using the Arduino IDE v1.6.5, with Arduino/ESP8266 v2.3.0, and MFRC522 v1.1.7
Everything compiles, and I've got the connections correct, but when calling PCD_Init, I get a Soft WDT reset and stack trace. :-(
Settings in IDE
Module: ?Generic ESP8266 Module? Flash Size: ?2MB/1MB? CPU Frequency: ?80Mhz? Flash Mode: ?DIO? Flash Frequency: ?40Mhz? Upload Using: ?SERIAL? Reset Method: ?ck?
Sketch
Debug Messages