mcqn / nfc-st25r3916

An RFID/NFC reader using the ST Microelectronics ST25R3916 chip
CERN Open Hardware Licence Version 2 - Strongly Reciprocal
2 stars 1 forks source link

Add an Arduino example to show how to use the reader code-wise #3

Open amcewen opened 9 months ago

amcewen commented 9 months ago

Add details on how to wire up the reader to an ESP32 and some Arduino code to drive it, along with details of the libraries to use.

amcewen commented 9 months ago

Added some basic example code. It needs tidying up but at present will detect tags presented and print out some details, including NDEF data if there's some on the tag, to serial; as well as illuminating the blue MCU LED1 LED on the NFC shield.

It sits in a loop constantly looking for tags and reading them in, so will keep re-printing the tag info over and over if you leave the tag on the reader.

In addition to the wiring detailed in Examples.md, I think I'd jumpered CN6-4 and CN6-5 together so VBUS on the NFC shield is running at 3V3. Will double-check and confirm at some point.

amcewen commented 9 months ago

You do need CN6-4 and CN6-5 to be jumpered together for it to run. (Either that or provide 5V to CN6-5, but that doesn't seem to have much, if any, effect on range, etc.)

Trying it with the NFC-08 board, that doesn't appear to work with the same code - at least it hasn't straight away. Will update when I get it running.