P
P
proger_102018-02-23 20:28:28
Python
proger_10, 2018-02-23 20:28:28

PN532V3 Sensor (NFC) + Raspberry - Python?

Hello!
Guys, I connected PN532V3 (namely version 3, red, square) to raspberry pi2 B, there are only 4 wires.
I can’t write a program in python, because I don’t understand how it should work.
Before that, he dealt with sensors, wrote programs of this type, for example, for a reed switch sensor:

import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)  
GPIO.setup(3, GPIO.IN) 
signal = GPIO.input(3) 
if signal: 
  print 'The door is open'
else:
  print 'The door is close'
GPIO.cleanup()

Here I wanted to write the same, but it does not work. All the examples that I found on the Internet either for arduino, or for other boards, or with other NFC sensors, I did not find anything with this sensor for "raspberry".
Please help with the program!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pavel Zhovner, 2018-09-19
@zhovner

PN532 is a contactless card chip. Why do you call it a sensor?
What interface did you connect it to: SPI, I2C, UART? There is a mode switch on the PN532 board.
To work with the board, you need the libnfc library.
There is no mention of working with anything similar to NFC in your code. First, describe what result you want to get?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question