Skip to content

Commit b2e4ea8

Browse files
author
Kevin Townsend
committed
Added alt pin selection for ESP8266
1 parent 04d2c94 commit b2e4ea8

File tree

5 files changed

+23
-2
lines changed

5 files changed

+23
-2
lines changed

examples/buildtest/buildtest.ino

+4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
#include <Adafruit_MFRC630.h>
33

44
/* Indicate the pin number where PDOWN is connected. */
5+
#if defined(ESP8266)
6+
#define PDOWN_PIN (A0)
7+
#else
58
#define PDOWN_PIN (A2)
9+
#endif
610

711
/* Show me some mojic! */
812
#define MOJIC_TRICK (0)

examples/mifare1K_dump_serial/mifare1K_dump_serial.ino

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
#include <Adafruit_MFRC630.h>
22

3-
/* Indicate the pin numbers where PDOWN/RX/TW are connected. */
3+
/* Indicate the pin number where PDOWN is connected. */
4+
#if defined(ESP8266)
5+
#define PDOWN_PIN (A0)
6+
#else
47
#define PDOWN_PIN (A2)
8+
#endif
59

610
/* Use UART */
711
Adafruit_MFRC630 rfid = Adafruit_MFRC630(&Serial1, PDOWN_PIN);

examples/mifare1k_dump/mifare1k_dump.ino

+4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
#include <Adafruit_MFRC630.h>
33

44
/* Indicate the pin number where PDOWN is connected. */
5+
#if defined(ESP8266)
6+
#define PDOWN_PIN (A0)
7+
#else
58
#define PDOWN_PIN (A2)
9+
#endif
610

711
/* Use the default I2C address */
812
Adafruit_MFRC630 rfid = Adafruit_MFRC630(MFRC630_I2C_ADDR, PDOWN_PIN);

examples/mifare1k_dump_spi/mifare1k_dump_spi.ino

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
#include <Wire.h>
22
#include <Adafruit_MFRC630.h>
33

4-
/* Indicate the pin number where PDOWN and CS/SSEL are connected. */
4+
/* Indicate the pin number where PDOWN is connected. */
5+
#if defined(ESP8266)
6+
#define PDOWN_PIN (A0)
7+
#define SSEL_PIN (15)
8+
#else
59
#define PDOWN_PIN (A2)
610
#define SSEL_PIN (A4)
11+
#endif
712

813
/* Use HW SPI */
914
Adafruit_MFRC630 rfid = Adafruit_MFRC630(MFRC630_TRANSPORT_SPI,

examples/ntag213_dump/ntag213_dump.ino

+4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
#include <Adafruit_MFRC630.h>
33

44
/* Indicate the pin number where PDOWN is connected. */
5+
#if defined(ESP8266)
6+
#define PDOWN_PIN (A0)
7+
#else
58
#define PDOWN_PIN (A2)
9+
#endif
610

711
/* Use the default I2C address */
812
Adafruit_MFRC630 rfid = Adafruit_MFRC630(MFRC630_I2C_ADDR, PDOWN_PIN);

0 commit comments

Comments
 (0)