Recently I've bought an Industruino D21G and the Ethenet module, all works perfectlly, however when I connect a RC522 reader to the board, the Industruino doesn´t recognize it, the reader is working on an Arduino Leonardo. I'm using this library to control the device: https://github.com/miguelbalboa/rfid, I've tried the example ReadNUID changing the Serial to SerialUSB, but the Industruino doesn´t recognize the reader, Im wiring the RC522 just like this:
RC522 3.3V --> Industruino protoboard 3.3V pin
RC522 RST --> Industruino protoboard D4
RC522 GND --> Industruino protoboard GND pin
RC522 SDA --> Industruino protoboard D5
RC522 SCK --> Industruino protoboard SCLK pin (next to the expansion port)
RC522 MISO --> Industruino protoboard MISO pin (next to the expansion port)
RC522 MOSI --> Industruino protoboard MOSI pin (next to the expansion port)
Can anyone help me?
Many thanks in advance
Hi, there could be multiple issues, please try these
(1) the D4 pin is the chip select of the SD card in the Ethernet module, so you cannot use this pin when the Ethernet module is connected. use D7 instead. see https://github.com/Industruino/documentation/blob/master/indio.md#idc-expansion-port-pinout
(2) the library file contains Serial.print https://github.com/miguelbalboa/rfid/blob/master/src/MFRC522.cpp change all to SerialUSB.print
(3) are you using the latest version of the library, it seems earlier versions had trouble with faster MCUs (the D21G runs at 48MHz) the SPI speed should be fixed at 4MHz as in https://github.com/miguelbalboa/rfid/blob/master/src/MFRC522.h
(4) there may be a conflict on the SPI bus, which is also used by the Ethernet chip, the SD card, FRAM chip. can you try a simple library example without the Ethernet module connected
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!