Skip to content

Commit b2c3f66

Browse files
committed
more content, more fixos
1 parent ad52432 commit b2c3f66

File tree

1 file changed

+55
-20
lines changed

1 file changed

+55
-20
lines changed

README.md

Lines changed: 55 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@ Arduino Library for the SparkFun Fingerprint Sensor - FPC2534 Pro
1212
![Compile - Test](https://img.shields.io/github/actions/workflow/status/sparkfun/SparkFun_FPC2534_Arduino_Library/compile-sketch.yml?label=compile%20test)
1313
![GitHub issues](https://img.shields.io/github/issues/sparkfun/SparkFun_FPC2534_Arduino_Library)
1414

15-
The [SparkFun Fingerprint Sensor - FPC2534 Pro]() is a small, highly capable and robust fingerprint sensor that can easily be integrated into virutally any application. Based off the AllKey Biometric System family from Fingerprints Cards (FPC), the FPC2534AP delivers incredible functionality in a small, compact formfactor.
15+
The [SparkFun Fingerprint Sensor - FPC2534 Pro]() is a small, highly capable and robust fingerprint sensor that can easily be integrated into virtually any application. Based off the AllKey Biometric System family from Fingerprints Cards (FPC), the FPC2534AP delivers incredible functionality in a small, compact formfactor.
1616

1717
## Functionality
1818

19-
The SparkFun Fingerprint Sensor - FPC2534 Pro is accessable 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 and UART, which are supported by this library.
2020

21-
This library provides a message-based, easy to use interface that enables fingerprint biometric authentication and simple finger-based navigation. Specificatlly, the FPC2534AP provides:
21+
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

2323
- Fingerprint enrollment - adding a fingerprint to the sensor
2424
- Fingerprint template management - managing recorded fingerprints
25-
- Fingerprint matching/indentification for biometric authentication
26-
- Trackpad like functionalality for simple, finger-based navigation
25+
- Fingerprint matching/identification for biometric authentication
26+
- Trackpad like functionality for simple, finger-based navigation
2727
- Application integration via a variety of communication methods
2828

2929
### Functionality not Supported by the Library
@@ -38,7 +38,7 @@ If any of these advanced features are desired for use, an implementation can be
3838

3939
## Communication
4040

41-
The operation of the FPC2534AP is performed by a messaging protocol implemented on the device. A client application sends message requests to the sensor and recieves responses to the request made.
41+
The operation of the FPC2534AP is performed by a messaging protocol implemented on the device. A client application sends message requests to the sensor and receives responses to the request made.
4242

4343
To support integration and messaging, the FPC2534AP provides support for four (4) different communication implementations. These are:
4444

@@ -47,10 +47,10 @@ To support integration and messaging, the FPC2534AP provides support for four (4
4747
- SPI
4848
- USB
4949

50-
The communication method used is selected via a pair of configuration jumpers on the SparkFun Fingerprint Sensor - FPC2534 Pro board. Further information on the use is oulined in the associated Hookup Guide for the SparkFun fingerprint breakout board.
50+
The communication method used is selected via a pair of configuration jumpers on the SparkFun Fingerprint Sensor - FPC2534 Pro board. Further information on the use is outlined in the associated Hookup Guide for the SparkFun fingerprint breakout board.
5151

5252
> [!NOTE]
53-
> The I2C (qwiic) interface for the SparkFun Fingerprint Sensor - FPC2534 Pro board is currently only supported on ESP32 and Raspberry RP2 (RP2040, RP2350) boards. The I2C Implemention of the FPC2534 device performs a dynamic payload transmission that is not supported by the Arduino Wire library. Because of this, a custom implementation is provided by this library for the ESP32 and RP2 platforms.
53+
> The I2C (qwiic) interface for the SparkFun Fingerprint Sensor - FPC2534 Pro board is currently only supported on ESP32 and Raspberry RP2 (RP2040, RP2350) boards. The I2C implementation of the FPC2534 device performs a dynamic payload transmission that is not supported by the Arduino Wire library. Because of this, a custom implementation is provided by this library for the ESP32 and RP2 platforms.
5454
5555
### Additional Connections
5656

@@ -59,26 +59,26 @@ In addition to the communication method selected, the FPC2534AP requires additio
5959
| Pin | Use | Notes |
6060
| -- | -- | -- |
6161
|RST | Reset Device | Setting the pin low, then high will reset the FPC2534AP, placing it into a known state|
62-
|IQ| IRQ/Interrupt Request|Used by the sensor to signal a new message/data availablity - note: this is not required when using the serial interface|
62+
|IQ| IRQ/Interrupt Request|Used by the sensor to signal a new message/data availability - note: this is not required when using the serial interface|
6363

6464
## Library
6565

66-
Unlike a majority of sensors and their associated libraries which are synchronous function calls - a function/method call returns a requested value or performs a specific action - the FPC2534AP operates using a messaging methodlogy - sending messages to the client as actions occur on the device, or in reponse to earlier requests.
66+
Unlike a majority of sensors and their associated libraries which are synchronous function calls - a function/method call returns a requested value or performs a specific action - the FPC2534AP operates using a messaging methodology - sending messages to the client as actions occur on the device, or in response to earlier requests.
6767

68-
Since messaging methodology is used by the FPC2534AP, this library makes makese use of the following implementation pattern:
68+
Since messaging methodology is used by the FPC2534AP, this library makes use of the following implementation pattern:
6969

70-
- User provided callback functions that the library calls when a specific message is recieved from the library (like when a finger is pressed on the sensor).
70+
- User provided callback functions that the library calls when a specific message is received from the library (like when a finger is pressed on the sensor).
7171
- A process message method that is called to process the next available message from the sensor if one is available. This method is called within your applications main processing loop (for Arduino, this is the `loop()` function).
7272

73-
While this methodlogy is unique to the when compaired to other libraries, it fits well with the event driven nature of the FPC2534AP fingerprint sensor.
73+
While this methodology is unique to the when compared to other libraries, it fits well with the event driven nature of the FPC2534AP fingerprint sensor.
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 theSparkFun 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, 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.
7878

7979
#### Getting Started
8080

81-
How the sensor is initialized is dependant 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 independant.
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.
8282

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

@@ -106,7 +106,7 @@ At this point, the sensor is ready for normal operation.
106106

107107
###### A note on "pinging" the FPC2534 sensor
108108

109-
Often, to determine if a sensor is available on the I2C bus, the bus is queried at the address for the device (a simple "ping"). In arduino this often looks like:
109+
Often, to determine if a sensor is available on the I2C bus, the bus is queried at the address for the device (a simple "ping"). In Arduino this often looks like:
110110

111111
```c++
112112
// Is the sensor there - on the I2C bus?
@@ -118,7 +118,7 @@ Often, to determine if a sensor is available on the I2C bus, the bus is queried
118118
Developing with the sensor has shown that once the sensor is "pinged", it enters an unknown state. To ensure proper device operation, a `reset()` of the device is needed after a `ping` operation is performed.
119119

120120
> [!NOTE]
121-
> The I2C (qwiic) interface for the SparkFun Fingerprint Sensor - FPC2534 Pro board is currently only supported on ESP32 and Raspberry RP2 (RP2040, RP2350) boards. The I2C Implemention of the FPC2534 device performs a dynamic payload transmission that is not supported by the Arduino Wire library. Because of this, a custom implementation is provided by this library for the ESP32 and RP2 platforms.
121+
> The I2C (qwiic) interface for the SparkFun Fingerprint Sensor - FPC2534 Pro board is currently only supported on ESP32 and Raspberry RP2 (RP2040, RP2350) boards. The I2C implementation of the FPC2534 device performs a dynamic payload transmission that is not supported by the Arduino Wire library. Because of this, a custom implementation is provided by this library for the ESP32 and RP2 platforms.
122122
123123
##### Using UART (Serial)
124124

@@ -138,7 +138,7 @@ Configure the following settings on the UART/Serial connection being used:
138138
| Read Buffer Size | 512|
139139

140140
> [!NOTE]
141-
> Due to the amount of information sent by the fingerprint sensor, the default size of the internal buffer used by Arduino Serial objects is rapidly exceeded. To prevent this, the buffer size must be increased before initializing the FPC2534AP device.
141+
> Due to the amount of information sent by the fingerprint sensor, the default size of the internal buffer used by Arduino Serial objects is rapidly exceeded. To prevent this, the buffer size must be increased before initializing the FPC2534AP device.
142142
>
143143
> To increase the buffer size when using a Raspberry pi RP2 Microcontroller:
144144
>
@@ -182,9 +182,44 @@ The operational pattern for the SparkFun FPC2543 Fingerprint sensor library is o
182182
183183
The loop sequence of operation - make a request, check for messages and respond via callback functions continue during the operation of the sensor.
184184
185+
##### Callback Functions
186+
187+
The results from the FPC2543 sensor are reported through the use of callback functions, which are user provided. While more advanced that standard functional programming, this implementation pattern is recommended by the FPC2543 manufacturer and fits nicely with the operational use of the sensor.
188+
189+
Callback functions are assigned with a structure of type ```sfDevFPC2534Callbacks_t```, which is passed to the library during the setup sequence.
190+
191+
The following callbacks are available for use:
192+
193+
| Callback Name | Description|
194+
| -- | -- |
195+
|on_error| Called when the sensor send an error message. An error code is provided|
196+
|on_status| Called with status update information from the sensor|
197+
|on_version| Called as a result of a version request. The version string is passed to the callback|
198+
|on_enroll| Called during a fingerprint enrollment process. The number of samples remaining and feedback are provided|
199+
|on_list_templates | Called with the results of a ```requestListTemplates()``` call|
200+
|on_navigation| Called when a navigation event is sent from the sensor|
201+
|on_gpio_control| Called as the result of a GPIO get request call|
202+
|on_system_config_get| Called when the system config is requested|
203+
|on_bist_done| Called when the built-in testing routine is finished. The result of this test is provided|
204+
|on_mode_change| Called when the mode of the sensor changes|
205+
|on_finger_change | Called when the finger presence on the sensor changes|
206+
|on_is_read_change| Called when the ready status of the sensor changes|
207+
208+
##### Startup Status Message
209+
210+
When the FPC2534 starts up, it posts a *is ready for use* status message, which can be detected within the ```on_status()``` callback function if provided to the library.
211+
212+
Another option is to register a ```on_is_ready_change()``` callback function, which is called when the ready state of the sensor changes. This simplifies the required implementation for using the sensor.
213+
214+
It the examples provided with this library, the ```on_is_ready_change()``` callback is used to determine when the sensor is ready for operation. When this callback is called with a "ready" value, the examples begin FPC2543 operations.
215+
216+
#### Error Conditions
217+
218+
If an error is reported by the sensor, the error value is pass to the registered ```on_error()``` callback function.
219+
185220
#### Navigation Mode
186221
187-
One of the operating modes of FPC2534 is *Navigation Mode*. Enabled by calling the ```startNavigationMode()``` on the library, the FPC2534 acts like a small touch pad/joystick when in Navigation Mode. It should be noted, the ```startNavigationMode()``` method also takes a parameter that sets the oriengation of the sensor. This is used when determining event type (up, down, left, right).
222+
One of the operating modes of FPC2534 is *Navigation Mode*. Enabled by calling the ```startNavigationMode()``` on the library, the FPC2534 acts like a small touch pad/joystick when in Navigation Mode. It should be noted, the ```startNavigationMode()``` method also takes a parameter that sets the orientation of the sensor. This is used when determining event type (up, down, left, right).
188223
189224
Events from this mode are communicated to the callback function assigned in the ```on_navigation``` field of the callback function structure that is passed to the library. The following events are supported:
190225
@@ -225,7 +260,7 @@ This process is outlined in the following diagram:
225260
3) A standard *loop*()* application pattern/method is started.
226261
4) The method ```processNextResponse()``` is called on the library to get updates from the sensor.
227262
5) The library identifies and parse an enrollment status message from the sensor
228-
6) The registered ```on_eroll()``` callback method is called, with the number of samples remaining.
263+
6) The registered ```on_enroll()``` callback method is called, with the number of samples remaining.
229264
- If the number is equal to zero, the process is complete and the fingerprint is enrolled/registered with the sensor.
230265
231266
> [!NOTE]

0 commit comments

Comments
 (0)