Recently, I use Android-Things on Raspberry pi. and I want reader tag on RC522
so, I decided to refer to source in on Git-hub https://github.com/Galarzaa90/android-things-rc522
first I try only 1 RC522 device. is success work. but in the end, what I want two RC522 devices are working. because My project is commute system. I want when employee go to work, reader tag on RC522 devices. and when employee go to home, reader tag on Another RC522 devices.
so I need two RC522 devices. but this source two RC522 reader fail. so I search raspberry pi gpio port.
current this source,
use 1. GPIO 8 (SPI0 CS0) -SDA 2. GPIO 11 (SPI0 SCLK) - SCK 3. GPIO 10 (SPI0 MOSI) - MOSI 4. GPIO 9 (SPI0 MISO) - MISO 5. GND - GND 6. GPIO 25 - RST 7. 3.3V PWR - 3.3V
is only 1 RC522 device.
I want add 1 RC522 device
1. GPIO 7 (SPI0 CS1) - SDA 2. GPIO 21 (SPI1 SCLK) - SCK 3. GPIO 20 (SPI1 MOSI) - MOSI 4. GPIO 19 (SPI1 MISO) - MISO 5. GND - GND 6. GPIO 12 -RST 7. 3.3V PWR - 3.3V
but this source seems to be able to modify this part.
private static final String SPI_PORT = "SPI0.1"; private static final String PIN_RESET = "BCM12";
to sum up,
it is possible, connect 2 RC522 devices?
it is possible how to control SPI1 gpio port ?