Skip to content

Commit 00d1277

Browse files
committed
add i2c bus number for examples in board #defines; add defines for IoT RedBoards
1 parent df7c028 commit 00d1277

File tree

2 files changed

+33
-7
lines changed

2 files changed

+33
-7
lines changed

examples/Example01_NavigationI2C/Example01_NavigationI2C.ino

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,30 @@
5555
//
5656
// Example pins tested for various SparkFun boards:
5757

58-
// ESP32 thing plus
58+
// // ESP32 thing plus
5959
// #define IRQ_PIN 16
6060
// #define RST_PIN 21
61+
// #define I2C_BUS 0
6162

6263
// ESP32 thing plus C
6364
// #define IRQ_PIN 32
6465
// #define RST_PIN 14
66+
// #define I2C_BUS 0
67+
68+
// ESP32 IoT RedBoard
69+
#define IRQ_PIN 26
70+
#define RST_PIN 27
71+
#define I2C_BUS 0
6572

6673
// rp2350 thing plus
67-
#define IRQ_PIN 11
68-
#define RST_PIN 12
74+
// #define IRQ_PIN 11
75+
// #define RST_PIN 12
76+
// #define I2C_BUS 0
77+
78+
// rp2350 RedBoard IoT
79+
// #define IRQ_PIN 29
80+
// #define RST_PIN 28
81+
// #define I2C_BUS 0
6982

7083
// State flags to manage sensor startup/state
7184
bool startNavigation = true;
@@ -255,7 +268,7 @@ void setup()
255268
Serial.println("[STARTUP]\tTouch Sensor FPC2534 found on I2C bus");
256269

257270
// The sensor is available - Initialize the sensor library
258-
if (!mySensor.begin(kFPC2534DefaultAddress, Wire, 0, IRQ_PIN))
271+
if (!mySensor.begin(kFPC2534DefaultAddress, Wire, I2C_BUS, IRQ_PIN))
259272
{
260273
Serial.println("[ERROR]\tFPC2534 not found. Check wiring. HALT.");
261274
while (1)

examples/Example02_EnrollI2C/Example02_EnrollI2C.ino

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,27 @@
7474
// ESP32 thing plus
7575
// #define IRQ_PIN 16
7676
// #define RST_PIN 21
77+
// #define I2C_BUS 0
7778

7879
// ESP32 thing plus C
7980
// #define IRQ_PIN 32
8081
// #define RST_PIN 14
82+
// #define I2C_BUS 0
83+
84+
// ESP32 IoT RedBoard
85+
#define IRQ_PIN 26
86+
#define RST_PIN 27
87+
#define I2C_BUS 0
8188

8289
// rp2350 thing plus
83-
#define IRQ_PIN 11
84-
#define RST_PIN 12
90+
// #define IRQ_PIN 11
91+
// #define RST_PIN 12
92+
// #define I2C_BUS 0
93+
94+
// rp2350 RedBoard IoT
95+
// #define IRQ_PIN 29
96+
// #define RST_PIN 28
97+
// #define I2C_BUS 0
8598

8699
// variable used to keep track of the number of enrolled templates on the sensor
87100
uint16_t numberOfTemplates = 0;
@@ -442,7 +455,7 @@ void setup()
442455
Serial.println("[STARTUP]\tTouch Sensor FPC2534 found on I2C bus");
443456

444457
// Initialize the sensor library
445-
if (!mySensor.begin(kFPC2534DefaultAddress, Wire, 0, IRQ_PIN))
458+
if (!mySensor.begin(kFPC2534DefaultAddress, Wire, I2C_BUS, IRQ_PIN))
446459
{
447460
Serial.println("[ERROR]\tFPC2534 not found. Check wiring. HALT.");
448461
while (1)

0 commit comments

Comments
 (0)