# FPS_G511C3 fingerprint sensor fails to run sketches properly

#### quique123

Joined May 15, 2015
404
Hi guys,

Im using this sensor (GT-511C3) here

Along with this library

If I add the debug = true line to the sketches I get this:

FPS - Open
FPS - SEND: "55 AA 01 00 00 00 00 00 01 00 01 01"

but nothing else happens. Im using the code examples from the library itself. Im using a 985Ω resistor and a 1.46kΩ as a divider.

Connections are
Arduino---------FPS
5V -------------Vcc
GND -----------GND
4 ---------------Tx
5 ---0.985------Rx
|
------1.46kΩ-----GND

I have to open the serial monitor a few times after upload in order for any sketch to work. Below are the Blink and Enroll sketches and what they give once I get them to work after opening the SM about 3 or 5 times after upload.

Code:
/*
FPS_Enroll.ino - Library example for controlling the GT-511C3 Finger Print Scanner (FPS)
Created by Josh Hawley, July 23rd 2013
basically, Feel free to hack away at it, but just give me credit for my work =)
TLDR; Wil Wheaton's Law

This simple sketch turns the LED on and off similar to the Arduino blink sketch.
It is used to show that communications are working.
*/

#include "FPS_GT511C3.h"
#include "SoftwareSerial.h"

// Hardware setup - FPS connected to:
//      digital pin 4(arduino rx, fps tx)
//      digital pin 5(arduino tx - 560ohm resistor fps tx - 1000ohm resistor - ground)
//        this brings the 5v tx line down to about 3.2v so we dont fry our fps

FPS_GT511C3 fps(4, 5);

void setup()
{
Serial.begin(9600);
//Serial.println("hi");
delay(100);
fps.UseSerialDebug = true; // so you can see the messages in the serial debug screen
fps.Open();
}

void loop()
{
fps.SetLED(true); // turn on the LED inside the fps
delay(1000);
fps.SetLED(false);// turn off the LED inside the fps
delay(1000);
}
When it works I get:

FPS - Open
FPS - SEND: "55 AA 01 00 00 00 00 00 01 00 01 01"
FPS - RECV: "55 AA 01 00 00 00 00 00 30 00 30 01"

FPS - LED on
FPS - SEND: "55 AA 01 00 01 00 00 00 12 00 13 01"
FPS - RECV: "55 AA 01 00 00 00 00 00 30 00 30 01"

FPS - LED off
FPS - SEND: "55 AA 01 00 00 00 00 00 12 00 12 01"
FPS - RECV: "55 AA 01 00 00 00 00 00 30 00 30 01"

FPS - LED on
FPS - SEND: "55 AA 01 00 01 00 00 00 12 00 13 01"
FPS - RECV: "55 AA 01 00 00 00 00 00 30 00 30 01"

FPS - LED off
FPS - SEND: "55 AA 01 00 00 00 00 00 12 00 12 01"
FPS - RECV: "55 AA 01 00 00 00 00 00 30 00 30 01"

FPS - LED on
FPS - SEND: "55 AA 01 00 01 00 00 00 12 00 13 01"
FPS - RECV: "55 AA 01 00 00 00 00 00 30 00 30 01"

FPS - LED off
FPS - SEND: "55 AA 01 00 00 00 00 00 12 00 12 01"
FPS - RECV: "55 AA 01 00 00 00 00 00 30 00 30 01"

FPS - LED on
FPS - SEND: "55 AA 01 00 01 00 00 00 12 00 13 01"
FPS - RECV: "55 AA 01 00 00 00 00 00 30 00 30 01"

Here is the FPS_Enroll.ino:

Code:
/*****************************************************************
FPS_Enroll.ino - Library example for controlling the GT-511C3 Finger Print Scanner (FPS)
Created by Josh Hawley, July 23rd 2013
basically, Feel free to hack away at it, but just give me credit for my work =)
TLDR; Wil Wheaton's Law

#include "FPS_GT511C3.h"
#include "SoftwareSerial.h"

void setup()
{
Serial.begin(9600); //set up Arduino's hardware serial UART
delay(100);
fps.Open();         //send serial command to initialize fps
fps.SetLED(true);   //turn on LED so fps can see fingerprint

Enroll();          //begin enrolling fingerprint
}

void Enroll()
{
// Enroll test

// find open enroll id
int enrollid = 0;
bool usedid = true;
while (usedid == true)
{
usedid = fps.CheckEnrolled(enrollid);
if (usedid==true) enrollid++;
}
fps.EnrollStart(enrollid);

// enroll
Serial.print("Press finger to Enroll #");
Serial.println(enrollid);
while(fps.IsPressFinger() == false) delay(100);
bool bret = fps.CaptureFinger(true);
int iret = 0;
if (bret != false)
{
Serial.println("Remove finger");
fps.Enroll1();
while(fps.IsPressFinger() == true) delay(100);
Serial.println("Press same finger again");
while(fps.IsPressFinger() == false) delay(100);
bret = fps.CaptureFinger(true);
if (bret != false)
{
Serial.println("Remove finger");
fps.Enroll2();
while(fps.IsPressFinger() == true) delay(100);
Serial.println("Press same finger yet again");
while(fps.IsPressFinger() == false) delay(100);
bret = fps.CaptureFinger(true);
if (bret != false)
{
Serial.println("Remove finger");
iret = fps.Enroll3();
if (iret == 0)
{
Serial.println("Enrolling Successful");
}
else
{
Serial.print("Enrolling Failed with error code:");
Serial.println(iret);
}
}
else Serial.println("Failed to capture third finger");
}
else Serial.println("Failed to capture second finger");
}
else Serial.println("Failed to capture first finger");
}

void loop()
{
delay(100000);
}
When it works I get this:

FPS - Open
FPS - SEND: "55 AA 01 00 00 00 00 00 01 00 01 01"
FPS - RECV: "55 AA 01 00 00 00 00 00 30 00 30 01"

FPS - LED on
FPS - SEND: "55 AA 01 00 01 00 00 00 12 00 13 01"
FPS - RECV: "55 AA 01 00 00 00 00 00 30 00 30 01"

FPS - CheckEnrolled
FPS - SEND: "55 AA 01 00 00 00 00 00 21 00 21 01"
FPS - RECV: "55 AA 01 00 04 10 00 00 31 00 45 01"

FPS - EnrollStart
FPS - SEND: "55 AA 01 00 00 00 00 00 22 00 22 01"
FPS - RECV: "55 AA 01 00 00 00 00 00 30 00 30 01"

Press finger to Enroll #0
FPS - IsPressFinger
FPS - SEND: "55 AA 01 00 01 00 00 00 26 00 27 01"
FPS - RECV: "55 AA 01 00 12 10 00 00 30 00 52 01"

FPS - IsPressFinger
FPS - SEND: "55 AA 01 00 01 00 00 00 26 00 27 01"
FPS - RECV: "55 AA 01 00 12 10 00 00 30 00 52 01"

FPS - IsPressFinger
FPS - SEND: "55 AA 01 00 01 00 00 00 26 00 27 01"
FPS - RECV: "55 AA 01 00 00 00 00 00 30 00 30 01"

FPS - CaptureFinger
FPS - SEND: "55 AA 01 00 01 00 00 00 60 00 61 01"
FPS - RECV: "55 AA 01 00 12 10 00 00 31 00 53 01"

Failed to capture first finger

And at this last CaptureFinger is when I pressed my finger to the reader.