# New RFID/NFC library question

**URL:** <https://forum.xod.io/t/new-rfid-nfc-library-question/1214>\
**Category:** Uncategorized\
**Created:** [October 12, 2018, 2:05pm UTC](https://forum.xod.io/t/new-rfid-nfc-library-question/1214 "2018-10-12T14:05:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dox](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/dox/32/424_2.png) [@dox](https://forum.xod.io/u/dox)\
**Post date:** [October 12, 2018, 2:05pm UTC](https://forum.xod.io/t/new-rfid-nfc-library-question/1214/1 "2018-10-12T14:05:10Z")

</div>

How is the RFID hardware connected?  
How will the module communicate? I do not see a i2c connection in the library examples.

---

<div class="post-metadata">

**Author:** ![nkrkv](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/nkrkv/32/8_2.png) [@nkrkv](https://forum.xod.io/u/nkrkv)\
**Post date:** [October 15, 2018, 8:13am UTC](https://forum.xod.io/t/new-rfid-nfc-library-question/1214/2 "2018-10-15T08:13:12Z")

</div>

The `xod-dev/pn532-nfc` library born as the result of wrapping an existing C++ library done by Adafruit. This library, unfortunatelly, hard-codes the I²C bus to hardware I²C #0. See your board docs to find out SDA and SCL pins. On Arduinos of Uno and Mega format these pins are the closest to the USB port, right next to AREF on the top connection header.

To make the interface adjustable in XOD we have to rewrite the library. Perhaps will do it someday.

---

<div class="post-metadata">

**Author:** ![dox](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/dox/32/424_2.png) [@dox](https://forum.xod.io/u/dox)\
**Post date:** [October 15, 2018, 8:56am UTC](https://forum.xod.io/t/new-rfid-nfc-library-question/1214/3 "2018-10-15T08:56:55Z")

</div>

So it doesn’t matter if I use the i2c bus or SPI connectors? Are they all hardcoded?

---

<div class="post-metadata">

**Author:** ![nkrkv](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/nkrkv/32/8_2.png) [@nkrkv](https://forum.xod.io/u/nkrkv)\
**Post date:** [October 15, 2018, 9:17am UTC](https://forum.xod.io/t/new-rfid-nfc-library-question/1214/4 "2018-10-15T09:17:40Z")

</div>

The XOD wrapper uses only the I2C bus connector. You have to use hardware I2C number 0 with this library.
