1

I'm working on a project where I need to use touchscreen and RC522 senzor on same Raspberry Pi, now I need to change senzor from SPI to I2C in order to do that I need to change mfrc522 module which is programed for SPI to I2C. Anyone knows how to do that?

I installed modul as its shown on this page: https://pimylifeup.com/raspberry-pi-rfid-rc522/

14
  • 1
    depends on the RC522 module you have - most I've seen breakout only the SPI pins - while I2C is possible, it's messy forum.arduino.cc/t/… - of course, a Raspberry pi could have 1, 2, 3 or 6 (I think I've accounted for all possibilities) depending on the model Pi you have - and each SPI has at least 2 hardware CE pins Jun 13 '21 at 0:06
  • 1
    Of course, if your RC522 module doesn't breakout the i2c pins, then buy one that does Jun 13 '21 at 0:12
  • 1
    So, is there a way to just use different code? Lets say I already have RC522 connected to I2C, is there a way to just reprogram modul for SPI to work on I2C? @JaromandaX I am completly new to Raspberry PI so i dont know a lot about pins, outputs... Jun 13 '21 at 20:57
  • 1
    Ah, I2C and SPI have different pins, so you need to change the hardware wiring. You CANNOT just use software to do that.
    – tlfong01
    Jun 14 '21 at 0:10
  • 1
    @tlfong01 Yes, I already know how to change wiring and how to enable I2C on Raspberry PI, but now I need to change software in order for it to work. Jun 14 '21 at 6:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.