Skip to content

Commit 821bc01

Browse files
committed
additions to operational logic description - added image
1 parent c8a03e0 commit 821bc01

File tree

1 file changed

+29
-5
lines changed

1 file changed

+29
-5
lines changed

README.md

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Features that the FPC2534 supports, but are not currently implemented by this li
3636

3737
If any of these advanced features are desired for use, an implementation can be found within the Fingerprints FPC2543 SDK, which is available on the [Fingerprints Website](https://www.fpc.com/products/documentation/).
3838

39-
### Communication
39+
## Communication
4040

4141
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.
4242

@@ -52,7 +52,7 @@ The communication method used is selected via a pair of configuration jumpers on
5252
> [!NOTE]
5353
> 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.
5454
55-
#### Additional Connections
55+
### Additional Connections
5656

5757
In addition to the communication method selected, the FPC2534AP requires additional connections to facilitate communication. The following connections are required:
5858

@@ -76,7 +76,11 @@ While this methodlogy is unique to the when compaired to other libraries, it fit
7676

7777
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.
7878

79-
#### Using I2C (Qwiic)
79+
#### Getting Started
80+
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.
82+
83+
##### Using I2C (Qwiic)
8084

8185
When using I2C to communicate with the fingerprint sensor, the class named `SfeFPC2534I2C` is used. An example of how to declare the sensor object is as follows:
8286

@@ -100,7 +104,7 @@ An example of calling the begin method:
100104

101105
At this point, the sensor is ready for normal operation.
102106

103-
##### A note on "pinging" the FPC2534 sensor
107+
###### A note on "pinging" the FPC2534 sensor
104108

105109
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:
106110

@@ -116,7 +120,7 @@ Developing with the sensor has shown that once the sensor is "pinged", it enters
116120
> [!NOTE]
117121
> 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.
118122
119-
#### Using UART (Serial)
123+
##### Using UART (Serial)
120124

121125
When using a UART (Serial) to communicate with the fingerprint sensor, the class named `SfeFPC2534UART` is used. An example of how to declare the sensor object is as follows:
122126

@@ -148,6 +152,8 @@ Configure the following settings on the UART/Serial connection being used:
148152
> Serial.setRxBufferSize(512);
149153
> ```
150154
155+
If using a different controller for your project, the method used to expand the Serial read buffer will need to be determined. Some platforms (STM32 appears to self adjust FIFO size) no additional calls are needed, but on others (normally older systems) no option exists rendering the Serial interface the FPC2543 un-usable on the platform.
156+
151157
To initialize the device, the Serial object used to communicate with the device is passed into the begin call.
152158
153159
An example of calling the begin method:
@@ -157,3 +163,21 @@ An example of calling the begin method:
157163
```
158164
159165
At this point, the sensor is ready for normal operation.
166+
167+
#### General Operation
168+
169+
The operational pattern for the SparkFun FPC2543 Fingerprint sensor library is outlined in the following diagram:
170+
171+
![Operational Sequence](docs/images/sfe-fpc2543-op-seq.png)
172+
173+
1) The first step is library initialization and setup.
174+
- The communication interface being used is provided to the library.
175+
- The operationa callback functions are registered. These functions are called in reponse to commands sent to the sensor.
176+
2) The next phase normally occurs in the ```loop``` section of system operation.
177+
3) The application makes a request/sends a command to the sensor. These calls are asynchronous, and result in a message being sent to the sensor by the library.
178+
4) During each loop iteration, the library method ```processNextResponse()``` is called. This method will check for new messages and process any messages sent by the sensor.
179+
5) When checking for new messages, the library gets the next message/reponse from the device via the in-use communication bus. This message is parsed, and processed.
180+
6) When a response message is parsed and identified, if the host application has registered a callback for this message type, that callback function is called.
181+
- The user takes the desired application action in the callback function.
182+
183+
The loop sequence of operation - make a request, check for messages and respond via callback functions continue during the operation of the sensor.

0 commit comments

Comments
 (0)