UNO R3, Windows 10, IDE 1.18.13
The goal is to use the Adafruit fingerprint reader to open and close a desk. But I have a conceptual problem. I have the library and do not recognize much in the way of help regarding how to use the software. Tere is a major problem.
Looking in the example directory, enroll.ino, in setup there is the line:
Serial.println("\n\nAdafruit Fingerprint sensor enrollment");
This appears to be a user prompt.
However, there is only one serial port and the fingerprint reader must use a serial port. I see that as a conflict. What am I missing?
A software serial port, or a serial port and a USB serial port?
It is quite typical to use the hardware serial port to communicate with the PC through the Serial Monitor and/or for programming and then use the SoftwareSerial library to use 2 other pins to communicate with the finger print module.
In fact, the very example you mention has comments to that effect
// For UNO and others without hardware serial, we must use software serial...
// pin #2 is IN from sensor (GREEN wire)
// pin #3 is OUT from arduino (WHITE wire)
// Set up the serial port to use softwareserial..
SoftwareSerial mySerial(2, 3);
...
There is something here I do not understand. From what I have read, the UNO has one and only one serial port. It can be accessed either through the USB connector or via digital pins 0 and 1. But not both places at the same time. When the fingerprint device is connected to the serial port, how can the notices to the user be displayed?
Only one HARDWARE serial port. The SoftwareSerial library can emulate a serial port in software on any two digital pins.
OK. Is the USB interface a software implemented serial port. If so, why do the TX and RX LEDs light up when downloading an application?
Is there any documentation that describes how to use the Adafruit library for the fingerprint reader?
I looked through the example in the Adafruit library and did not find any input/output to what appears to be other than the standard serial io that uses the USB interface and can be seen with the Serial Monitor. Please provide some example code that contrasts uses both the USB serial interface and some communications with the fingerprint device.
Thank you.
No, the 'USB interface' is a USB-to-Serial adapter connected to the hardware serial port.
The TX and RX LEDs are part of the USB-to-Serial adapter.
Yes. Adafruit has detailed tutorials for all of the devices they sell. Which sensor do you have?
$49.95 Fingerprint Sensor
$19.95 Basic Fingerprint Sensor: Basic Fingerprint Sensor With Socket Header Cable : ID 4690 : $19.95 : Adafruit Industries, Unique & fun DIY electronics and kits
$19.95 Ultra-Slim Round Fingerprint Sensor
Ultra-Slim Round Fingerprint Sensor and 6-pin Cable : ID 4750 : $19.95 : Adafruit Industries, Unique & fun DIY electronics and kits
The library also comes with examples.
I have the round fingerprint sensor suitable for putting in a panel. I have the library and as noted in an earlier post have been looking at the code. I do not find anything that looks like communications with the fingerprint device.
Did you not see reply #3? That example creates a software serial object for communication with the fingerprint device so you can use the hardware serial port for messages
How far have you gotten with the Adafruit tutorial? At what step does your reader not perform as the tutorial says it should?
In the several tutorials I have found, none of them simply state the basic concepts. From this conversation, and from what I read, I now suspect:
In order to configure/train the fingerprint device, it must be connected to the desktop computer, with or without the Arduino.
Once the fingerprint data for my fingerprint (for example) is loaded on the device, it is ready to be connected to the Arduino and put in service, without the desktop computer connection.
To make changes in the enrollment database, the reader must be again connected to the desktop computer to make those changes.
Please make corrections in my presumptions.
That is not true. Granted, it would be easier to have it connected to a PC so you can see the messages on the Serial Monitor, but there are many other ways to achieve this.
You could have a switch connected to the nano, in one position it is "run" mode and in the other it is "program finderprint" mode.
You could also connect a small i2c 16x2 LCD display (adafruit sells those as well) and then put the messages there rather than to Serial.
You could also have a button that you press which makes the built-in LED (pin 13 on the nano) blink to indicate your are in "program" mode vs. "run" mode. Then, store a new fingerprint and return to "run" mode.
That is something the "enroll" example sketch will do. You can also incorporate the "enroll" function into your own sketch.
Ok, I see your point. Still, the tutorials do not describe that overall concept.
And I don't know how many of those examples can be loaded on the UNO R3 at one time.
I presume that from the examples, load fingerprint.ino and use the return value from either getFingerprintID() or finger.image2Tz() to initiate the open or close function. Still looking at that.
Is there any guidance on how to hook the device up directly to the desktop computer to do the enrollment work? I am thinking to take a laptop over to the fingerprint device, connect the device to the laptop, and do the enrollment functions rather than trying to use the Arduino.
Thank you for your time and patience.
Onlyone sketch exists on your board. You can combine example sketches, or parts of example sketches together, but only 1 sketch on your board
The overall concept is covered by the first part of the tutorial:
There are basically two requirements for using the optical fingerprint sensor. First is you'll need to enroll fingerprints - that means assigning ID #'s to each print so you can query them later. Once you've enrolled all your prints, you can easily 'search' the sensor, asking it to identify which ID (if any) is currently being photographed.
You can enroll using the Windows software (easiest and neat because it shows you the photograph of the print) or with the Arduino sketch (good for when you don't have a Windows machine handy or for on-the-road enrolling).
"The" tutorial. Please direct me to the correct one.
You said you had "the round fingerprint sensor suitable for putting in a panel". That sounds like the Ultra-Slim Round Fingerprint Sensor, Product ID 4750. See reply 7 for the link to the product page.
On the product page there is a link that says:
We've also written a detailed tutorial on wiring and use of these types fingerprint sensors.
Follow that link (or the one further down that says "Datasheets, software, wiring examples and more all in the Learning System guide") to get to the tutorial.
You could also have clicked on the link to the tutorial just below where I said "The overall concept is covered by the first part of the tutorial:".
I downloaded and unzipped what I thought was the Adafruit library. It has a documentation directory which is nothing more than the description of the device translated to English. It has an "examples" directory with eight programs. The ones I looked at are incomplete and call functions that I cannot find.
Where is the file to download and install into the IDE becoming the library?
Can we stop the hand-waving, please, and show some specifics?
Code, links, facts.