Skip to content

Commit

Permalink
chore: restore examples
Browse files Browse the repository at this point in the history
  • Loading branch information
REGIOIGER committed Dec 26, 2024
1 parent a464faf commit 766be1a
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 45 deletions.
7 changes: 2 additions & 5 deletions examples/DetectTags/DetectTags.ino
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@
#define PN7150_VEN (13)
#define PN7150_ADDR (0x28)

Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7150);
//Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7160);
// creates a global NFC device interface object, attached to pins 7 (IRQ) and 8 (VEN) and using the default I2C address 0x28
Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR);
// creates a global NFC device interface object, attached to pins 11 (IRQ) and 13 (VEN) and using the default I2C address 0x28

// Function prototypes
String getHexRepresentation(const byte* data, const uint32_t numBytes);
Expand All @@ -35,14 +34,12 @@ void setup() {

Serial.println("Initializing...");
if (nfc.connectNCI()) { // Wake up the board
//if (nfc.connectNCI_PN7160()) { // Wake up the board
Serial.println("Error while setting up the mode, check connections!");
while (1)
;
}

if (nfc.configureSettings()) {
//if (nfc.configureSettings_PN7160()) {
Serial.println("The Configure Settings is failed!");
while (1)
;
Expand Down
3 changes: 1 addition & 2 deletions examples/DetectingReaders/DetectingReaders.ino
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
#define PN7150_VEN (13)
#define PN7150_ADDR (0x28)

Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7150);
//Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7160);
Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR);
// Creates a global NFC device interface object, attached to pins 11 (IRQ) and 13 (VEN) and using the default I2C address 0x28


Expand Down
5 changes: 1 addition & 4 deletions examples/ISO14443-3A_read_block/ISO14443-3A_read_block.ino
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@

#define BLK_NB_ISO14443_3A (5) // Block to be read it

Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7150);
//Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7160);
Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR);
// creates a global NFC device interface object, attached to pins 7 (IRQ) and 8 (VEN) and using the default I2C address 0x28

void PrintBuf(const byte* data, const uint32_t numBytes) { // Print hex data buffer in format
Expand Down Expand Up @@ -66,14 +65,12 @@ void setup() {

Serial.println("Initializing...");
if (nfc.connectNCI()) { // Wake up the board
//if (nfc.connectNCI_PN7160()) { // Wake up the board
Serial.println("Error while setting up the mode, check connections!");
while (1)
;
}

if (nfc.configureSettings()) {
//if (nfc.configureSettings_PN7160()) {
Serial.println("The Configure Settings failed!");
while (1)
;
Expand Down
7 changes: 2 additions & 5 deletions examples/ISO14443-3A_write_block/ISO14443-3A_write_block.ino
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@
#define BLK_NB_ISO14443_3A (5) // Block to be read it
#define DATA_WRITE_ISO14443_3A 0x11, 0x22, 0x33, 0x44 // Data to write

Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7150);
//Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7160);
// creates a global NFC device interface object, attached to pins 7 (IRQ) and 8 (VEN) and using the default I2C address 0x28
Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR);
// creates a global NFC device interface object, attached to pins 11 (IRQ) and 13 (VEN) and using the default I2C address 0x28

void PrintBuf(const byte* data, const uint32_t numBytes) { // Print hex data buffer in format
uint32_t szPos;
Expand Down Expand Up @@ -82,14 +81,12 @@ void setup() {

Serial.println("Initializing...");
if (nfc.connectNCI()) { // Wake up the board
//if (nfc.connectNCI_PN7160()) { // Wake up the board
Serial.println("Error while setting up the mode, check connections!");
while (1)
;
}

if (nfc.configureSettings()) {
//if (nfc.configureSettings_PN7160()) {
Serial.println("The Configure Settings failed!");
while (1)
;
Expand Down
7 changes: 2 additions & 5 deletions examples/ISO15693_read_block/ISO15693_read_block.ino
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@

#define BLK_NB_ISO15693 (8) // Block to be read it

Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7150);
//Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7160);
// creates a global NFC device interface object, attached to pins 7 (IRQ) and 8 (VEN) and using the default I2C address 0x28
Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR);
// creates a global NFC device interface object, attached to pins 11 (IRQ) and 13 (VEN) and using the default I2C address 0x28

void PrintBuf(const byte* data, const uint32_t numBytes) { // Print hex data buffer in format
uint32_t szPos;
Expand Down Expand Up @@ -67,14 +66,12 @@ void setup() {

Serial.println("Initializing...");
if (nfc.connectNCI()) { // Wake up the board
//if (nfc.connectNCI_PN7160()) { // Wake up the board
Serial.println("Error while setting up the mode, check connections!");
while (1)
;
}

if (nfc.configureSettings()) {
//if (nfc.configureSettings_PN7160()) {
Serial.println("The Configure Settings is failed!");
while (1)
;
Expand Down
7 changes: 2 additions & 5 deletions examples/ISO15693_write_block/ISO15693_write_block.ino
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@
#define BLK_NB_ISO15693 (8) // Block to write
#define DATA_WRITE_ISO15693 0x11, 0x22, 0x33, 0x44 // Data to write

Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7150);
//Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7160);
// creates a global NFC device interface object, attached to pins 7 (IRQ) and 8 (VEN) and using the default I2C address 0x28
Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR);
// creates a global NFC device interface object, attached to pins 11 (IRQ) and 13 (VEN) and using the default I2C address 0x28

void setup() {
Serial.begin(9600);
Expand All @@ -32,14 +31,12 @@ void setup() {

Serial.println("Initializing...");
if (nfc.connectNCI()) { // Wake up the board
//if (nfc.connectNCI_PN7160()) { // Wake up the board
Serial.println("Error while setting up the mode, check connections!");
while (1)
;
}

if (nfc.configureSettings()) {
//if (nfc.configureSettings_PN7160()) {
Serial.println("The Configure Settings is failed!");
while (1)
;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
#define BLK_NB_MFC 4 // Block tat wants to be read
#define KEY_MFC 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF // Default Mifare Classic key

Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7150);
//Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7160);
Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR);
// creates a global NFC device interface object, attached to pins 11 (IRQ) and 13 (VEN) and using the default I2C address 0x28

void PrintBuf(const byte* data, const uint32_t numBytes) { // Print hex data buffer in format
Expand Down Expand Up @@ -74,14 +73,12 @@ void setup() {

Serial.println("Initializing...");
if (nfc.connectNCI()) { // Wake up the board
//if (nfc.connectNCI_PN7160()) { // Wake up the board
Serial.println("Error while setting up the mode, check connections!");
while (1)
;
}

if (nfc.configureSettings()) {
//if (nfc.configureSettings_PN7160()) {
Serial.println("The Configure Settings is failed!");
while (1)
;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@
// Data to be written in the Mifare Classic block
#define DATA_WRITE_MFC 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff

Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7150);
//Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7160);
// creates a global NFC device interface object, attached to pins 7 (IRQ) and 8 (VEN) and using the default I2C address 0x28
Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR);
// creates a global NFC device interface object, attached to pins 11 (IRQ) and 13 (VEN) and using the default I2C address 0x28

void PrintBuf(const byte* data, const uint32_t numBytes) { // Print hex data buffer in format
uint32_t szPos;
Expand Down Expand Up @@ -111,14 +110,12 @@ void setup() {

Serial.println("Initializing...");
if (nfc.connectNCI()) { // Wake up the board
//if (nfc.connectNCI_PN7160()) { // Wake up the board
Serial.println("Error while setting up the mode, check connections!");
while (1)
;
}

if (nfc.configureSettings()) {
//if (nfc.configureSettings_PN7160()) {
Serial.println("The Configure Settings is failed!");
while (1)
;
Expand Down
3 changes: 1 addition & 2 deletions examples/NDEFReadMessage/NDEFReadMessage.ino
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ void displayDeviceInfo();
void displayRecordInfo(NdefRecord record);

// Create a global NFC device interface object, attached to pins 11 (IRQ) and 13 (VEN) and using the default I2C address 0x28
Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7150);
//Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7160);
Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR);

NdefMessage message;

Expand Down
3 changes: 1 addition & 2 deletions examples/NDEFSendMessage/NDEFSendMessage.ino
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
// Function prototypes
void messageSentCallback();

Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7150);
//Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7160);
Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR);
// Creates a global NFC device interface object, attached to pins 11 (IRQ) and 13 (VEN) and using the default I2C address 0x28
NdefMessage message;

Expand Down
3 changes: 1 addition & 2 deletions examples/NDEFSendRawMessage/NDEFSendRawMessage.ino
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
// Function prototypes
void messageSentCallback();

Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7150);
//Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7160);
Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR);
// Creates a global NFC device interface object, attached to pins 11 (IRQ) and 13 (VEN) and using the default I2C address 0x28
NdefMessage message;

Expand Down
5 changes: 1 addition & 4 deletions examples/P2P_Discovery/P2P_Discovery.ino
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
#define PN7150_VEN (13)
#define PN7150_ADDR (0x28)

Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7150);
//Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7160);
Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR);
// creates a global NFC device interface object, attached to pins 11 (IRQ) and 13 (VEN) and using the default I2C address 0x28
RfIntf_t RfInterface; //Intarface to save data for multiple tags

Expand All @@ -38,13 +37,11 @@ void setup(){

Serial.println("Initializing...");
if (nfc.connectNCI()) { //Wake up the board
//if (nfc.connectNCI_PN7160()) { // Wake up the board
Serial.println("Error while setting up the mode, check connections!");
while (1);
}

if (nfc.configureSettings()) {
//if (nfc.configureSettings_PN7160()) {
Serial.println("The Configure Settings failed!");
while (1);
}
Expand Down

0 comments on commit 766be1a

Please sign in to comment.