SparkFun Forums 

Where electronics enthusiasts find answers.

General project discussion / help
Did you make a robotic coffee pot which implements HTCPCP and decafs unauthorized users? Show it off here!
By eddygrinder
#186908
Hi,
I'm trying to use a simple program to test FPS sensor GT511C1R - https://www.sparkfun.com/products/13007 with ARDUINO MEGA

I followed this tutorial - http://www.homautomation.org/2014/10/11 ... n-arduino/ and tried to test with this program:
Code: Select all
#include "FPS_GT511C1R.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 voltage divider brings the 5v tx line down to about 3.2v so we dont fry our fps

FPS_GT511C1R fps(10, 11);

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


void loop()
{
  // FPS Blink LED Test
  fps.SetLED(true);
  delay(1000);
  fps.SetLED(false);
  delay(1000);
}
However, the only response that I have on serial monitor is this:
Code: Select all
FPS - Open
FPS - SEND: "55 AA 01 00 00 00 00 00 01 00 01 01"
I'm starting to think that the sensor is broken.

Any ideas how to get this to work?

Thanks a lot,
Eddy
By Valen
#186946
To which pins on the Arduino Mega do you have the TX and RX lines going to? Because the SoftwareSerial implementation in your code expects pin 10 and 11. Whereas the example/tutorial uses 4 and 5. Also pay attention to the use of those resistors mentioned to protect your fingerprintscanner from overvoltage.
By eddygrinder
#187040
UPDATE--1
I used the example code that came with the library. However I saw on this post:
http://forum.arduino.cc/index.php?topic=270220.0
that was necessary to change the libraries.

Now I have my program like this:
Code: Select all
/* 
 FPS_Enroll.ino - Library example for controlling the GT-511C3 Finger Print Scanner (FPS)
 Created by Josh Hawley, July 23rd 2013
 Licensed for non-commercial use, must include this license message
 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_GT511C1R.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_GT511C1R fps(18, 19);

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


void loop()
{
 // FPS Blink LED Test
 fps.SetLED(true); // turn on the LED inside the fps
 delay(1000);
 fps.SetLED(false);// turn off the LED inside the fps
 delay(1000);
}
I connected on (RX1,TX1)=(18,19)

Modified libraries as explained in link above

The result is always the same... :smiley-confuse:
You do not have the required permissions to view the files attached to this post.
By eddygrinder
#187041
UPDATE--2
Today at work I've changed from arduino Mega to Uno R3.
(Later I will try to get it work on Mega)
The "blink" program from "Examples" works.

However, when I open the serial monitor the sensor freezes - stay always on/off - and I can't send any message to serial monitor.
Code: Select all
/* 
	FPS_Enroll.ino - Library example for controlling the GT-511C3 Finger Print Scanner (FPS)
	Created by Josh Hawley, July 23rd 2013
	Licensed for non-commercial use, must include this license message
	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);
	fps.UseSerialDebug = true; // so you can see the messages in the serial debug screen
	fps.Open();
      Serial.print("Press finger to Enroll #");

}


void loop()
{
	// FPS Blink LED Test
	fps.SetLED(true); // turn on the LED inside the fps
     // Serial.print("Press finger to Enroll #");

	delay(1000);
	fps.SetLED(false);// turn off the LED inside the fps
	delay(1000);
}
By JohnLinden
#192713
Could it be that the INCLUDE file you are using is not suited to the GT511C1R and your include is #include "FPS_GT511C3.h" it's just a thought.
By Valen
#192741
That's how the file is named on Sparkfun's very own github page of that product. So I think he's good on that one. Unless you have reason to believe there is a compatibility bug somewhere!?!