Intermediate
30 min

Secure your projects with GROW R503 and PIC18F2610

Adapt to any challenge with ease

Fingerprint 3 Click with EasyPIC v8

Published Nov 01, 2023

Click board™

Fingerprint 3 Click

Dev Board

EasyPIC v8

Compiler

NECTO Studio

MCU

PIC18F2610

Create an efficient access control application that will include an authentication solution

A

A

Hardware Overview

How does it work?

Fingerprint 3 Click is an adapter Click board™ that simplifies the connection of add-on boards to the mikroBUS™ socket. This Click board™ represents a small-size PCB that can be connected to the mikroBUS™ socket like any other Click board™, with a 1x6 1.0mm pitch vertical type wire to board connector placed on itself. Each of the header pins corresponds to a pin on the mikroBUS™ socket being used, such as UART lines (TX, RX), 3V3 power supply, finger detection signal, and Ring LED enable for GROW R503 module and ground. This Click board™ allows easy pin access and manipulation while always retaining a perfect connection quality. Fingerprint processing includes two parts: fingerprint recording and fingerprint matching. The first step is initializing all the necessary drivers, peripherals, and pins. At power-on, it takes about 200ms for initialization; during this period, the module can't accept any commands.

This is followed by checking the sensor and verifying the module password, after which a new fingerprint pattern begins if everything is done correctly. The user needs to enter the finger two times. The system will process the two-time finger images, generate a template of the finger based on processing results, and store the template. When matching, a user enters the finger through an optical sensor, and the system will generate a template of the finger and compare it with templates of the finger library. In both circumstances, the system will return the matching result, success or failure. This can also be seen in an example code that contains easy-to-use functions that may be used as a reference for further development. The Fingerprint 3 Click communicates with MCU using the UART interface with the default baud rate of 57600bps for the data transfer, while the GPIO pins on this Click board™ are used for finger detection and ring indicator LED

enable. Ring indicator LED light labeled as VD can be enabled by toggling the signal routed to the RST pin on the mikroBUS™, while the signal routed to the INT pin on the mikroBUS™ represents an interrupt and indicates the detection of a finger on the module. When the indicator glows purple, the module is in its Stand-By mode and waits for a finger to be pressed. In addition to purple, the module can also glow blue or red, indicating the fingerprint match's correctness (blue indicates that a pair is found, while red indicates that a pair was not found). This Click board™ can only be operated with a 3.3V logic voltage level. The board must perform appropriate logic voltage level conversion before using MCUs with different logic levels. However, the Click board™ comes equipped with a library containing functions and an example code that can be used as a reference for further development.

Fingerprint 3 Click top side image
Fingerprint 3 Click lateral side image
Fingerprint 3 Click bottom side image

Features overview

Development board

EasyPIC v8 is a development board specially designed for the needs of rapid development of embedded applications. It supports many high pin count 8-bit PIC microcontrollers from Microchip, regardless of their number of pins, and a broad set of unique functions, such as the first-ever embedded debugger/programmer. The development board is well organized and designed so that the end-user has all the necessary elements, such as switches, buttons, indicators, connectors, and others, in one place. Thanks to innovative manufacturing technology, EasyPIC v8 provides a fluid and immersive working experience, allowing access anywhere and under any

circumstances at any time. Each part of the EasyPIC v8 development board contains the components necessary for the most efficient operation of the same board. In addition to the advanced integrated CODEGRIP programmer/debugger module, which offers many valuable programming/debugging options and seamless integration with the Mikroe software environment, the board also includes a clean and regulated power supply module for the development board. It can use a wide range of external power sources, including a battery, an external 12V power supply, and a power source via the USB Type-C (USB-C) connector.

Communication options such as USB-UART, USB DEVICE, and CAN are also included, including the well-established mikroBUS™ standard, two display options (graphical and character-based LCD), and several different DIP sockets. These sockets cover a wide range of 8-bit PIC MCUs, from the smallest PIC MCU devices with only eight up to forty pins. EasyPIC v8 is an integral part of the Mikroe ecosystem for rapid development. Natively supported by Mikroe software tools, it covers many aspects of prototyping and development thanks to a considerable number of different Click boards™ (over a thousand boards), the number of which is growing every day.

EasyPIC v8 horizontal image

Microcontroller Overview

MCU Card / MCU

default

Architecture

PIC

MCU Memory (KB)

64

Silicon Vendor

Microchip

Pin count

28

RAM (Bytes)

3968

You complete me!

Accessories

Fingerprint Sensor with Two-Color LED Ring (GROW R503) is a capacitive fingerprint sensor module scanner with a two-color ring indicator. The module is designed in a circular shape with a diameter of 28mm. It's important to mention that this module represents an integrated image-collecting and algorithm chip together. GROW R503 module has an image buffer and six feature file buffers. An important note for users is that all buffer contents are not saved after power failure. A fingerprint pattern template can be composed of 2-6 feature files. If the composite template has more characteristic files, the fingerprint pattern template has better quality. The module's enclosure is dust resistant but not waterproof with a ring indicator LED light controlled by command, and it has a high recognition rate and the flexibility to adapt to different conditions of human fingers, whether it's dry, wet, or a person of different ages. This module can be connected to the Fingerprint 3 Click or to any other product that has a 1.0mm pitch vertical type wire-to-board connector as this module and the appropriate type of communication.

Fingerprint 3 Click accessories image

Used MCU Pins

mikroBUS™ mapper

NC
NC
AN
Ring Indicator LED Enable
RA0
RST
NC
NC
CS
NC
NC
SCK
NC
NC
MISO
NC
NC
MOSI
Power Supply
3.3V
3.3V
Ground
GND
GND
NC
NC
PWM
Fingerprint Detection
RB1
INT
UART TX
RC6
TX
UART RX
RC7
RX
NC
NC
SCL
NC
NC
SDA
NC
NC
5V
Ground
GND
GND
2

Take a closer look

Schematic

Fingerprint 3 Click Schematic schematic

Step by step

Project assembly

EasyPIC v8 front image hardware assembly

Start by selecting your development board and Click board™. Begin with the EasyPIC v8 as your development board.

EasyPIC v8 front image hardware assembly
LTE IoT 5 Click front image hardware assembly
MCU DIP 28 hardware assembly
LTE IoT 5 Click complete accessories setup image hardware assembly
EasyPIC v8 28pin-DIP Access - upright/background hardware assembly
Necto image step 2 hardware assembly
Necto image step 3 hardware assembly
Necto image step 4 hardware assembly
NECTO Compiler Selection Step Image hardware assembly
NECTO Output Selection Step Image hardware assembly
Necto image step 6 hardware assembly
Necto DIP image step 7 hardware assembly
Necto image step 8 hardware assembly
Necto image step 9 hardware assembly
Necto image step 10 hardware assembly
Necto PreFlash Image hardware assembly

Track your results in real time

Application Output

After pressing the "FLASH" button on the left-side panel, it is necessary to open the UART terminal to display the achieved results. By clicking on the Tools icon in the right-hand panel, multiple different functions are displayed, among which is the UART Terminal. Click on the offered "UART Terminal" icon.

UART Application Output Step 1

Once the UART terminal is opened, the window takes on a new form. At the top of the tab are two buttons, one for adjusting the parameters of the UART terminal and the other for connecting the UART terminal. The tab's lower part is reserved for displaying the achieved results. Before connecting, the terminal has a Disconnected status, indicating that the terminal is not yet active. Before connecting, it is necessary to check the set parameters of the UART terminal. Click on the "OPTIONS" button.

UART Application Output Step 2

In the newly opened UART Terminal Options field, we check if the terminal settings are correct, such as the set port and the Baud rate of UART communication. If the data is not displayed properly, it is possible that the Baud rate value is not set correctly and needs to be adjusted to 115200. If all the parameters are set correctly, click on "CONFIGURE".

UART Application Output Step 3

The next step is to click on the "CONNECT" button, after which the terminal status changes from Disconnected to Connected in green, and the data is displayed in the Received data field.

UART Application Output Step 4

Software Support

Library Description

This library contains API for Fingerprint 3 Click driver.

Key functions:

  • void fingerprint3_parser_rsp ( fingerprint3_rsp_t *response ) - Response parser function.
  • uint8_t fingerprint3_byte_ready ( void ) - Check for new byte received.
  • void fingerprint3_uart_write ( uint8_t *tx_data, uint8_t n_bytes ) - Uart write function.

Open Source

Code example

This example can be found in NECTO Studio. Feel free to download the code, or you can copy the code below.

/*!
 * \file 
 * \brief Fingerprint3 Click example
 * 
 * # Description
 * This example reads and processes data from Fingerprint 3 clicks.
 *
 * The demo application is composed of two sections :
 * 
 * ## Application Init 
 * Initializes the driver, configures the sensor, and enrolls fingerprints.
 * 
 * ## Application Task  
 * Takes an image of the finger, then checks if there's a fingerprint in the library that matches the
 * one it has just read. All data is being logged on the USB UART.
 * 
 * ## Additional Function
 * - static void display_error ( char *message )
 * - static void display_full_rsp ( fingerprint3_t *ctx )
 * - static void search_finger( fingerprint3_t *ctx )
 * - static void match_finger( fingerprint3_t *ctx, uint16_t location )
 * - static uint8_t enroll_finger( fingerprint3_t *ctx, uint16_t location, uint8_t features )
 *  
 * \author MikroE Team
 *
 */
// ------------------------------------------------------------------- INCLUDES

#include "board.h"
#include "log.h"
#include "fingerprint3.h"
#include "string.h"

// ------------------------------------------------------------------ VARIABLES

#define LOCATION_IN_LIBRARY            1    // Location in flash where the fingerprint template will be stored.
#define NUMBER_OF_FINGERPRINTS         2    // Number of fingerprints for enrolling.
#define NUMBER_OF_IMAGES               3    // Number of images it will take for a single fingerprint template.

static fingerprint3_t fingerprint3;
static log_t logger;
uint8_t package_content[ FINGERPRINT3_MAX_PACKAGE_LENGTH ];
uint8_t error_check = 0;

// ------------------------------------------------------- ADDITIONAL FUNCTIONS

/**
 * @brief Display error function.
 *
 * @param message  Input string.
 *
 * @description This function concatenates status of response to the input string and prints it on the USB UART.
 */
static void display_error ( char *message );

/**
 * @brief Display full response function.
 *
 * @param ctx  Click object.
 *
 * @description This function parses and displays full response to the previously sent command on the USB UART.
 */
static void display_full_rsp ( fingerprint3_t *ctx );

/**
 * @brief Search finger function.
 *
 * @param ctx  Click object.
 *
 * @description This function searches the whole finger library for the template that matches the one 
 *              it stores in char_buffer 1. All data is being logged on the USB UART.
 */
static void search_finger( fingerprint3_t *ctx );

/**
 * @brief Match finger function.
 *
 * @param ctx       Click object.
 * @param location  Location in library.
 *
 * @description This function checks if the template stored at the desired location matches the fingerprint
 *              it reads. All data is being logged on the USB UART.
 */
static void match_finger( fingerprint3_t *ctx, uint16_t location );

/**
 * @brief Enroll finger function.
 *
 * @param ctx       Click object.
 * @param location  Location in library where the fingerprint template will be stored.
 * @param features  Number of fingerprint images it will combine in a template.
 *
 * @description This function enrolls the fingerprint, creates a template combining the taken images and
 *              stores it at the desired location. All data is being logged on the USB UART.
 */
static uint8_t enroll_finger( fingerprint3_t *ctx, uint16_t location, uint8_t features );


// ------------------------------------------------------ APPLICATION FUNCTIONS

void application_init ( void )
{
    log_cfg_t log_cfg;
    fingerprint3_cfg_t cfg;

    /** 
     * Logger initialization.
     * Default baud rate: 115200
     * Default log level: LOG_LEVEL_DEBUG
     * @note If USB_UART_RX and USB_UART_TX 
     * are defined as HAL_PIN_NC, you will 
     * need to define them manually for log to work. 
     * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
     */
    LOG_MAP_USB_UART( log_cfg );
    log_init( &logger, &log_cfg );
    log_info( &logger, "---- Application Init ----" );
    Delay_ms( 100 );

    //  Click initialization.

    fingerprint3_cfg_setup( &cfg );
    FINGERPRINT3_MAP_MIKROBUS( cfg, MIKROBUS_1 );
    err_t init_flag = fingerprint3_init( &fingerprint3, &cfg );
    if ( init_flag == UART_ERROR ) 
    {
        log_error( &logger, " Application Init Error. " );
        log_info( &logger, " Please, run program again... " );

        for ( ; ; );
    }
    Delay_ms( 100 );
    
    error_check = fingerprint3_set_config ( &fingerprint3, FINGERPRINT3_DEFAULT_ADDRESS, 
                                                           FINGERPRINT3_DEFAULT_PASSWORD );
    display_error( "Set Config" );
    Delay_ms( 500 );
    
    error_check = fingerprint3_soft_reset ( &fingerprint3 );
    display_error( "Soft Reset" );
    Delay_ms( 500 );
    
    error_check = fingerprint3_check_sensor ( &fingerprint3 );
    display_error( "Check Sensor" );
    Delay_ms( 500 );
    
    error_check = fingerprint3_empty_library ( &fingerprint3 );
    display_error( "Empty the Library" );
    Delay_ms( 500 );
    
    uint8_t cnt = 0; 
    do 
    {
        log_printf( &logger, " >>>  Register fingerprint %u of %u  <<<\r\n", ( uint16_t ) cnt + 1, 
                                                                             ( uint16_t ) NUMBER_OF_FINGERPRINTS );
        log_printf( &logger, "--------------------------------- \r\n" );
        error_check = enroll_finger ( &fingerprint3, LOCATION_IN_LIBRARY + cnt, NUMBER_OF_IMAGES );
        display_error( "Enroll finger" );
        if ( FINGERPRINT3_OK != error_check )
        {
            log_printf( &logger, " Please enroll your fingerprint again.\r\n" );
            log_printf( &logger, "--------------------------------- \r\n" );
        }
        else
        {
            cnt++;
        }
        Delay_ms( 1000 );
    }
    while ( FINGERPRINT3_OK != error_check || cnt != NUMBER_OF_FINGERPRINTS );
}

void application_task ( void )
{    
    search_finger( &fingerprint3 );
}

void main ( void )
{
    application_init( );

    for ( ; ; )
    {
        application_task( );
    }
}

static void display_error ( char *message )
{
    log_printf( &logger, " %s: ", message );
    if ( FINGERPRINT3_OK == error_check )
    {
        log_printf( &logger, "DONE!\r\n" );
    }
    else
    {
        log_printf( &logger, "FAIL! [ERROR] Num: 0x%.2X\r\n", ( uint16_t ) error_check );
    }
    log_printf( &logger, "--------------------------------- \r\n" );
}

static void display_full_rsp ( fingerprint3_t *ctx )
{
    log_printf( &logger, "* Header            : 0x%.4X\r\n", ctx->rsp.header );
    log_printf( &logger, "* Address           : 0x%.8LX\r\n", ctx->rsp.addr );
    log_printf( &logger, "* Package identifier: 0x%.2X\r\n", ( uint16_t ) ctx->rsp.pkg_id );
    log_printf( &logger, "* Package length    : 0x%.4X\r\n", ctx->rsp.pkg_len );

    log_printf( &logger, "* Confirmation code :" );

    if ( ctx->rsp.pkg_content[ 0 ] == FINGERPRINT3_CONF_CMD_OK )
    {
        log_printf( &logger, " OK!\r\n" );
    }
    else
    {
        log_error( &logger, " Num: 0x%.2X", ( uint16_t ) ctx->rsp.pkg_content[ 0 ] );
    }

    if ( ctx->rsp.pkg_len > 3 )
    {
        log_printf( &logger, "* Package Content: " );
        for ( uint16_t n_cnt = 1; n_cnt < ctx->rsp.pkg_len - 2; n_cnt++ )
        {

            log_printf( &logger, "0x%.2X ", ( uint16_t ) ctx->rsp.pkg_content[ n_cnt ] );
        }
        log_printf( &logger, "\r\n" );
    }

    log_printf( &logger, "* Checksum           : 0x%.4X \r\n", ctx->rsp.checksum );
}

static void search_finger( fingerprint3_t *ctx )
{
    log_printf( &logger, "  >>> Searching Fingerprints <<<  \r\n" );
    log_printf( &logger, "--------------------------------- \r\n" );
    fingerprint3_aura_control ( &fingerprint3, FINGERPRINT3_AURA_CTRL_BREATH, 0xFF, 
                                               FINGERPRINT3_AURA_LED_PURPLE, FINGERPRINT3_AURA_TIME_INFINITE );
    log_printf( &logger, " Put your finger on the sensor  \r\n" );
    log_printf( &logger, "--------------------------------- \r\n" );
    
    while ( fingerprint3_finger_indicator( &fingerprint3 ) == FINGERPRINT3_DETECT_NO_FINGER );
    
    while ( FINGERPRINT3_OK != fingerprint3_aura_control ( &fingerprint3, FINGERPRINT3_AURA_CTRL_OFF, 0xFF, 
                                                                          FINGERPRINT3_AURA_LED_PURPLE, 
                                                                          FINGERPRINT3_AURA_TIME_INFINITE ) )
    {
        Delay_ms( 100 );
    }
    for ( ; ; )
    {
        error_check = fingerprint3_take_image ( &fingerprint3 );
        if ( FINGERPRINT3_OK != error_check )
        {
            display_error( "Take Image" );
            Delay_ms( 1000 );
            continue;
        }
        error_check = fingerprint3_extract_features ( &fingerprint3, 1 );
        
        if ( FINGERPRINT3_OK != error_check )
        {
            display_error( "Extract Features" );
            Delay_ms( 1000 );
            continue;
        }
        break;
    }
    
    uint16_t match_score, location;
    
    error_check = fingerprint3_search_finger ( &fingerprint3, 1, &location, &match_score );
    if ( FINGERPRINT3_OK == error_check )
    {
        log_printf( &logger, "  >>>>> FINGERPRINT MATCH <<<<<< \r\n\r\n" );
        log_printf( &logger, "  Location: 0x%.4X Match score : %u\r\n", location, match_score );
        log_printf( &logger, "---------------------------------\r\n" );
        fingerprint3_aura_control ( &fingerprint3, FINGERPRINT3_AURA_CTRL_BREATH, 0x80, 
                                                   FINGERPRINT3_AURA_LED_BLUE, 1 );
    }
    else if ( FINGERPRINT3_CONF_NOT_FOUND == error_check )
    {
        log_printf( &logger, " >>>>> NO MATCH in library <<<<<<\r\n\r\n" );
        log_printf( &logger, "---------------------------------\r\n" );
        fingerprint3_aura_control ( &fingerprint3, FINGERPRINT3_AURA_CTRL_BREATH, 0x80, 
                                                   FINGERPRINT3_AURA_LED_RED, 1 );
    }
    else
    {
        display_error( "Search Finger" );
        fingerprint3_aura_control ( &fingerprint3, FINGERPRINT3_AURA_CTRL_BREATH, 0x80, 
                                                   FINGERPRINT3_AURA_LED_RED, 1 );
    }
    Delay_ms( 100 );
    log_printf( &logger, " Lift the finger of the sensor.\r\n" );
    log_printf( &logger, "--------------------------------- \r\n" );
            
    error_check = fingerprint3_take_image ( &fingerprint3 );
    while ( error_check != FINGERPRINT3_CONF_NO_FINGER )
    {
        Delay_ms( 100 );
        error_check = fingerprint3_take_image ( &fingerprint3 );
    }
    while ( fingerprint3_finger_indicator( &fingerprint3 ) != FINGERPRINT3_DETECT_NO_FINGER );
    
    Delay_ms( 1000 );
}

static void match_finger( fingerprint3_t *ctx, uint16_t location )
{
    error_check = fingerprint3_load_template ( &fingerprint3, 2, location );
    display_error( "Load Template" );
    Delay_ms( 100 );
    
    log_printf( &logger, "  >>> Matching Fingerprints <<<  \r\n" );
    log_printf( &logger, "--------------------------------- \r\n" );
    fingerprint3_aura_control ( &fingerprint3, FINGERPRINT3_AURA_CTRL_BREATH, 0xFF, 
                                               FINGERPRINT3_AURA_LED_PURPLE, FINGERPRINT3_AURA_TIME_INFINITE );
    log_printf( &logger, " Put your finger on the sensor  \r\n" );
    log_printf( &logger, "--------------------------------- \r\n" );
    
    while ( fingerprint3_finger_indicator( &fingerprint3 ) == FINGERPRINT3_DETECT_NO_FINGER );
    
    while ( FINGERPRINT3_OK != fingerprint3_aura_control ( &fingerprint3, FINGERPRINT3_AURA_CTRL_OFF, 0xFF, 
                                                                          FINGERPRINT3_AURA_LED_PURPLE, 
                                                                          FINGERPRINT3_AURA_TIME_INFINITE ) )
    {
        Delay_ms( 100 );
    }
    
    for ( ; ; )
    {
        error_check = fingerprint3_take_image ( &fingerprint3 );
        if ( FINGERPRINT3_OK != error_check )
        {
            display_error( "Take Image" );
            Delay_ms( 1000 );
            continue;
        }
        error_check = fingerprint3_extract_features ( &fingerprint3, 3 );
        
        if ( FINGERPRINT3_OK != error_check )
        {
            display_error( "Extract Features" );
            Delay_ms( 1000 );
            continue;
        }
        break;
    }
    
    uint16_t match_score;
    
    error_check = fingerprint3_match_finger ( &fingerprint3, &match_score );
    if ( FINGERPRINT3_OK == error_check )
    {
        log_printf( &logger, "  >>>>> FINGERPRINT MATCH <<<<<< \r\n\r\n" );
        log_printf( &logger, "  Match score       : %u\r\n", match_score );
        log_printf( &logger, "---------------------------------\r\n" );
        fingerprint3_aura_control ( &fingerprint3, FINGERPRINT3_AURA_CTRL_BREATH, 0x80, 
                                                   FINGERPRINT3_AURA_LED_BLUE, 1 );
    }
    else if ( FINGERPRINT3_CONF_NO_MATCH == error_check )
    {
        log_printf( &logger, " >>>>> NO MATCH at location: 0x%.4X <<<<<<\r\n\r\n", location );
        log_printf( &logger, "---------------------------------\r\n" );
        fingerprint3_aura_control ( &fingerprint3, FINGERPRINT3_AURA_CTRL_BREATH, 0x80, 
                                                   FINGERPRINT3_AURA_LED_RED, 1 );
    }
    else
    {
        display_error( "Match Finger" );
        fingerprint3_aura_control ( &fingerprint3, FINGERPRINT3_AURA_CTRL_BREATH, 0x80, 
                                                   FINGERPRINT3_AURA_LED_RED, 1 );
    }
    Delay_ms( 100 );
    log_printf( &logger, " Lift the finger of the sensor.\r\n" );
    log_printf( &logger, "--------------------------------- \r\n" );
            
    error_check = fingerprint3_take_image ( &fingerprint3 );
    while ( error_check != FINGERPRINT3_CONF_NO_FINGER )
    {
        Delay_ms( 100 );
        error_check = fingerprint3_take_image ( &fingerprint3 );
    }
    while ( fingerprint3_finger_indicator( &fingerprint3 ) != FINGERPRINT3_DETECT_NO_FINGER );
    
    Delay_ms( 1000 );
}

static uint8_t enroll_finger( fingerprint3_t *ctx, uint16_t location, uint8_t features )
{
    for ( uint8_t cnt = 1; cnt <= features; )
    {
        log_printf( &logger, " >>>  Taking image %u of %u  <<<\r\n", ( uint16_t ) cnt, 
                                                                     ( uint16_t ) features );
        log_printf( &logger, "--------------------------------- \r\n" );

        log_printf( &logger, " Put your finger on the sensor  \r\n" );
        log_printf( &logger, "--------------------------------- \r\n" );
        fingerprint3_aura_control ( &fingerprint3, FINGERPRINT3_AURA_CTRL_BREATH, 0xFF, 
                                                   FINGERPRINT3_AURA_LED_PURPLE, FINGERPRINT3_AURA_TIME_INFINITE );

        while ( fingerprint3_finger_indicator( &fingerprint3 ) == FINGERPRINT3_DETECT_NO_FINGER );
        
        while ( FINGERPRINT3_OK != fingerprint3_aura_control ( &fingerprint3, FINGERPRINT3_AURA_CTRL_OFF, 0xFF, 
                                                                              FINGERPRINT3_AURA_LED_PURPLE, 
                                                                              FINGERPRINT3_AURA_TIME_INFINITE ) )
        {
            Delay_ms( 100 );
        }

        error_check = fingerprint3_take_image ( &fingerprint3 );
        display_error( "Take Image" );
                
        if ( FINGERPRINT3_OK == error_check )
        {
            Delay_ms( 100 );
            error_check = fingerprint3_extract_features ( &fingerprint3, cnt );
            display_error( "Extract Features" );
            if ( FINGERPRINT3_OK == error_check )
            {
                cnt++;
            }
            Delay_ms( 100 );
            fingerprint3_aura_control ( &fingerprint3, FINGERPRINT3_AURA_CTRL_BREATH, 0x80, 
                                                       FINGERPRINT3_AURA_LED_BLUE, 1 );
            Delay_ms( 100 );
            
        }

        log_printf( &logger, " Lift the finger of the sensor.\r\n" );
        log_printf( &logger, "--------------------------------- \r\n" );
        
        error_check = fingerprint3_take_image ( &fingerprint3 );
        while ( error_check != FINGERPRINT3_CONF_NO_FINGER )
        {
            Delay_ms( 100 );
            error_check = fingerprint3_take_image ( &fingerprint3 );
        }
        while ( fingerprint3_finger_indicator( &fingerprint3 ) != FINGERPRINT3_DETECT_NO_FINGER );
        Delay_ms( 100 );
    }
    error_check = fingerprint3_create_template ( &fingerprint3 );
    display_error( "Create Template" );
    if ( FINGERPRINT3_OK != error_check )
    {
        return error_check;
    }
    Delay_ms( 100 );
    error_check = fingerprint3_store_template ( &fingerprint3, 1, location );
    display_error( "Store Template" );
    if ( FINGERPRINT3_OK != error_check )
    {
        return error_check;
    }
    Delay_ms( 100 );
    
    return FINGERPRINT3_OK;
}

// ------------------------------------------------------------------------ END

Additional Support

Resources