1.. _grow_r502a: 2 3GROW_R502A Fingerprint Sensor 4############################# 5 6Overview 7******** 8 9This sample has the below functionalities: 10 11#. Shows the number of fingerprints stored in the sensor. 12#. When SENSOR_ATTR_RECORD_FREE_IDX is set then it search for free index in sensor library. 13#. When SENSOR_ATTR_RECORD_ADD is set then it adds a new fingerprint to the sensor. 14#. When SENSOR_ATTR_RECORD_FIND is set then it tries to find a match for the input fingerprint. On finding a match it returns ID and confidence. 15#. When SENSOR_ATTR_RECORD_DEL is set then it deletes a fingerprint from the sensor. 16 17Note: Fingerprint add & delete functionalities work only when SENSOR_TRIG_TOUCH is set. 18Tricolored LED in the sensor hardware will, flash on the below conditions: 19 20#. On successful addition or deletion of fingerprint it will flash in blue three times. 21#. On finding a match for the input fingerprint it will flash in purple. 22#. In all other cases it will flash in red. 23 24Wiring 25******* 26 27This sample uses an external breakout for the sensor. A devicetree 28overlay must be provided to identify the UART bus and the GPIO 29used to control the sensor. Sensor can be powered using mentioned optional GPIO. 30 31References 32********** 33 34For more information about the GROW_R502A Fingerprint Sensor see 35http://en.hzgrow.com/product/143.html 36 37Building and Running 38******************** 39 40After providing a devicetree overlay that specifies the sensor location, 41build this sample app using: 42 43.. zephyr-app-commands:: 44 :zephyr-app: samples/sensor/grow_r502a 45 :board: nrf52840dk_nrf52840 46 :goals: build flash 47 48Sample Output 49************* 50 51.. code-block:: console 52 53 *** Booting Zephyr OS build zephyr-v3.1.0-2640-g328bb73113d4 *** 54 template count : 0 55 Fingerprint Deleted at ID #3 56 Fingerprint template free idx at ID #0 57 Waiting for valid finger to enroll as ID #0 58 Place your finger 59 Fingerprint successfully stored at #0 60 template count : 1 61 Matched ID : 0 62 confidence : 170 63 template count : 1 64 Matched ID : 0 65 confidence : 136 66 template count : 1 67 Matched ID : 0 68 confidence : 318 69 <repeats endlessly> 70