# Node-red-contrib-rc522 on SPI1

**URL:** <https://discourse.nodered.org/t/node-red-contrib-rc522-on-spi1/86112>\
**Category:** General\
**Created:** [4 March 2024 08:34 UTC](https://discourse.nodered.org/t/node-red-contrib-rc522-on-spi1/86112 "2024-03-04T08:34:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marcos](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcos/32/18284_2.png) [@Marcos](https://discourse.nodered.org/u/Marcos)\
**Post date:** [4 March 2024 08:34 UTC](https://discourse.nodered.org/t/node-red-contrib-rc522-on-spi1/86112/1 "2024-03-04T08:34:28Z")

</div>

Hi everyone,  
I am using node-red-contrib-rc522 on a raspberry pi and as long as I use the pins indicated by default everything works fine.  
Since I need to use the RFID reader together with a touch screen that has a connector that occupies the first 26 pins of the Raspberry GPIO, I have to move the RFID reader to SPI1.  
Then, connecting the reader to the pins as per follow

33 3,3V  
37 RST  
39 GND  
34 IRQ  
35 MISO  
38 MOSI  
40 SCK  
36 SDA

and by changing in accordance the configuration of file /home/pi/.node-red/node-modules/node-red-contrib-rc522/rc522.js, the reader can consistently read the cards I use.

However, in this situation, immediately after the deployment of the rc522 node on my flow, the touch screen goes white and, although the touch function continues to work, I can no longer see anything.

From time to time the reading of the card fails too.

This suggests a conflict to me.

The touch screen peripherals use spi0.0 (touch input) and spi0.1 (graph) and therefore it seems that something is conflicting with spi0.1

I tried also to look in mfrc522-rpi and rpi-softspi libraries to change some configurations but I wasn’t able to fix the issue.

I’m currently using this config.txt for the overlay

dtoverlay=spi0-2cs  
dtoverlay=spi1-3cs,cs0\_pin=36,cs1\_pin=31 ,cs2\_pin=32

but I guess the issue is related to something else. Am I wrong?

Do you have any idea on what to change to avoid this problem?

---

<div class="post-metadata">

**Author:** ![Marcos](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcos/32/18284_2.png) [@Marcos](https://discourse.nodered.org/u/Marcos)\
**Post date:** [14 March 2024 11:04 UTC](https://discourse.nodered.org/t/node-red-contrib-rc522-on-spi1/86112/2 "2024-03-14T11:04:08Z")

</div>

there were 2 errors.  
1 - in the overlay line numbers to be used are those of the GPIO and not the ones of the pins  
2 - in the file /home/pi/.node-red/node-modules/node-red-contrib-rc522/rc522.js there is a line that refers to RST pin too that was at first ignored by me.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [12 June 2024 11:04 UTC](https://discourse.nodered.org/t/node-red-contrib-rc522-on-spi1/86112/3 "2024-06-12T11:04:28Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
