RFID MFRC522 library

Hi,I would like to use an RFID MFRC522 on an ESP32 Devkit C board.
Zerynth hasn’t got that library. Has anyone already used this sensor?

Hi @simo51298
the module uses SPI protocol, I think you can implement the basic features using the SPI drivers in Zerynth.
Let me know if you needed help :slight_smile:

Hi, I’m porting from a micropython library. I don’t know how to translate:
spi.write(b’%c’ % int(0xff & ((reg<<1 & 0x7e)))
the problem is b’%c’ , what type does spi.write() want?

Since you want to send a byte,
I think you can evaluate the expression, assign it in a variable then initiate a byte object with its value then send this byte.
something like this:

x = int(0xff & ((reg<<1 & 0x7e)))
x_byte = bytearray(1)
x_byte[0] = x

Did you succeed in porting the library and make the reader work?

Not yet, I’m working on it.