Skip to content

Commit 5512127

Browse files
committed
added SPI content
1 parent 04e24b4 commit 5512127

File tree

1 file changed

+32
-3
lines changed

1 file changed

+32
-3
lines changed

README.md

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The [SparkFun Fingerprint Sensor - FPC2534 Pro]() is a small, highly capable and
1616

1717
## Functionality
1818

19-
The SparkFun Fingerprint Sensor - FPC2534 Pro is accessible via a variety of interfaces, including I2C and UART, which are supported by this library.
19+
The SparkFun Fingerprint Sensor - FPC2534 Pro is accessible via a variety of interfaces, including I2C, UART and SPI, which are supported by this library.
2020

2121
This library provides a message-based, easy to use interface that enables fingerprint biometric authentication and simple finger-based navigation. Specifically, the FPC2534AP provides:
2222

@@ -74,11 +74,11 @@ While this methodology is unique to the when compared to other libraries, it f
7474

7575
### Using the Library
7676

77-
The first step to using the library is selected the method used to communicate with the device. The library supports I2C on select platforms, or UART (a Serial interface in Arduino). Once selected, and device connected as outlined in the hookup guide for the SparkFun Fingerprint Sensor - FPC2534 Pro. The type of connection depends on the method used to communicate with the device.
77+
The first step to using the library is selected the method used to communicate with the device. The library supports I2C on select platforms, UART (a Serial interface in Arduino) or SPI. Once selected, and device connected as outlined in the hookup guide for the SparkFun Fingerprint Sensor - FPC2534 Pro. The type of connection depends on the method used to communicate with the device.
7878

7979
#### Getting Started
8080

81-
How the sensor is initialized is dependent on the communication method being utilized. The following sections outline how to use setup and initialize the I2C or UART interfaces to the device. Once setup, the operation of the device is communication method independent.
81+
How the sensor is initialized is dependent on the communication method being utilized. The following sections outline how to use setup and initialize the I2C, UART or SPI interfaces to the device. Once setup, the operation of the device is communication method independent.
8282

8383
##### Using I2C (Qwiic)
8484

@@ -164,6 +164,33 @@ An example of calling the begin method:
164164
165165
At this point, the sensor is ready for normal operation.
166166
167+
##### Using SPI
168+
169+
When using SPI to communicate with the fingerprint sensor, the class named `SfeFPC2534SPI` is used. An example of how to declare the sensor object is as follows:
170+
171+
```c++
172+
// Declare our sensor object
173+
SfeFPC2534I2C mySensor;
174+
```
175+
176+
To initialize the device, the following is needed:
177+
178+
- The SPI bus to use - if using a the simple begin function, the default bus is used.
179+
- The Settings for the SPI connection - if using a the simple begin function, default settings are used.
180+
- The CS PIN for the SPI connection
181+
- The Pin number the IRQ of the device is connected to. This IRQ is used by the sensor to indicated data is available for reading from the device.
182+
183+
An example of calling the simple begin method:
184+
185+
```c++
186+
bool status = mySensor.begin(myCSPin, interruptPin );
187+
```
188+
189+
At this point, the sensor is ready for normal operation.
190+
191+
> [!NOTE]
192+
> In the provided examples, the FPC2534 sensor is reset after the ```begin``` method is called, to ensure the senors is in a startup state.
193+
167194
#### General Operation
168195
169196
The operational pattern for the SparkFun FPC2543 Fingerprint sensor library is outlined in the following diagram:
@@ -244,6 +271,7 @@ To further understand how to use Navigation mode, review the Navigation examples
244271
245272
- [Navigation using I2C](examples/Example01_NavigationI2C/Example01_NavigationI2C.ino)
246273
- [Navigation using Serial](examples/Example03_NavigationUART/Example03_NavigationUART.ino)
274+
- [Navigation using SPI](examples/Example05_NavigationSPI/Example05_NavigationSPI.ino)
247275
248276
#### Enroll a Fingerprint
249277
@@ -270,6 +298,7 @@ To further understand how to use the Enroll mode in your application, review the
270298
271299
- [Enroll and Identify using I2C](examples/Example02_EnrollI2C/Example02_EnrollI2C.ino)
272300
- [Enroll and Identify using Serial](examples/Example04_EnrollUART/Example04_EnrollUART.ino)
301+
- [Enroll and Identify using SPI](examples/Example06_EnrollSPI/Example06_EnrollSPI.ino)
273302
274303
#### Identify a Fingerprint
275304

0 commit comments

Comments
 (0)