A
A
Andrey2014-03-14 21:04:35
Java
Andrey, 2014-03-14 21:04:35

How to receive data from RC522(RFID) to Raspberry pi using Pi4j?

Tell me how to get card numbers from an Rfid reader (RC-522) on PI using Pi4j.
If anyone knows how, please make a test case.
I connected Rc522, made an event listener, wrote a simple program, but I don’t receive data.
here is a piece of code:

controller = GpioFactory.getInstance();
            GpioProvider provider = new RaspiGpioProvider();
            pinMosi = controller.provisionDigitalMultipurposePin(provider, RaspiPin.GPIO_12, PinMode.DIGITAL_OUTPUT);
            pinMiso = controller.provisionDigitalMultipurposePin(provider, RaspiPin.GPIO_13, PinMode.DIGITAL_INPUT);

If RC522 is disconnected and connected, I get an event: DIGITAL_STATE_CHANGE.
Nothing else comes from the board.
Tell me how to work with RFID through PI4j?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question