Anda di halaman 1dari 20

Adafruit Holiday Shipping: Adafruit will not be shipping orders on Tuesday January 1, 2019

due to New Year's Day Any Expedited orders placed after 11am Monday December 31 will
go out Wednesday January 2.
<="" div="" style="box-sizing: border-box; clear: both;">

• Shop

• Learn

• Blog

• Forums

• Videos

• Adabox

• IO

Sign In
0
• Explore & Learn

GUIDE CATEGORIES (SEE ALL 1689)

o ADABOX (48)
o ADAFRUIT PRODUCTS (273)
o ARDUINO COMPATIBLES (377)
o BREAKOUT BOARDS (131)
o CIRCUIT PLAYGROUND (218)
o COLLIN'S LAB (8)
o COMPONENTS (109)
o COMMUNITY SUPPORT (23)
o CUSTOMER & PARTNER PROJECTS (30)
o DEVELOPMENT BOARDS (54)
o EDUCATORS (28)
o EL WIRE/TAPE/PANEL (13)
o FEATHER (172)
o HACKS (47)
o INTERNET OF THINGS - IOT (146)
o LCDS & DISPLAYS (177)
o LEDS (358)
o MAKER BUSINESS (34)
o MICRO:BIT (11)
o MICROCONTROLLERS (297)
o PROGRAMMING (167)
o PROJECTS (209)
o RASPBERRY PI (345)
o ROBOTICS & CNC (82)
o SENSORS (347)
o TOOLS (64)
o WEARABLES (227)
o 3D PRINTING (288)
o CRICKIT (40)
o MAKECODE (91)
o TRELLIS (30)
NEW GUIDES (SEE ALL 102)

o NYE CIRCUIT PLAYGROUND


DROP

o NEOTRELLIS LIGHT PAINTING

o MAKE IT TALK
o CIRCUIT PLAYGROUND
CHRISTMAS TREE

FEATURED GUIDES (SEE ALL 25)

o WELCOME TO CIRCUITPYTHON!
o
CIRCUITPYTHON MEDIA DIAL
o CRICKIT POWERED MINERVA
OWL ROBOT

o THANKSGIVING ROBOTIC
TURKEY HAND WITH CIRCUIT PLAYGROUND EXPRESS AND CRICKIT

Submit
Adafruit Optical Fingerprint Sensor
All-in-one fingerprint sensors make ID easy

• Overview
• Enrolling vs. Searching
• Wiring for use with Arduino
o Enrolling with Arduino
• CircuitPython
• Downloads

• Featured Products
• Single Page
• Download PDF
Contributors

lady ada
Kattni Rembor
Feedback? Corrections?
SENSORS / BIOMETRIC

Wiring for use with Arduino

by lady ada
Once you've tested the sensor, you can now use it within a sketch to verify a
fingerprint. We'll need to rewire the sensor. Disconnect the green and white
wires and plug the green wire into digital 2 and the white wire to digital 3.
(For ESP8266 use 4 & 5, for devices with Hardware UART use 0 & 1)
It is normal for the sensor to blink the LED quickly once powered, after that
the LED may stay off until you've started to request data from it
If your
sensor
has
differe
nt
wires,
The
first
wire
from
the left
should
be the
black
wire
ground,
then
the two
data
pins,
RX is
the
white
wire,
TX is
the
green
wire
then
the red
power
wire.
You'll
have to
cut,
strip
and
solder
the
wires.
If your
sensor
has all
the
same-
color
wires,
The
first
wire
from
the left
is
ground,
then
the two
data
pins,
then
power.
You'll
have to
cut,
strip
and
solder
the
wires.

RX is
the
same
as the
White
wire
TX
is the
same
as the
Green
wire

Arduino UNO & Compatible Wiring


This example sketch uses pins 2 and 3 for software serial (on ATmega328P
type boards by default) - Not all boards support Software Serial on all pins
so check board documentation! For example on ESP8266 we used 4 & 5
You can power the sensor from 3.3V or 5V
In the diagrams below we show the wires plugged directly into the Arduino.
However, this does not work well because the wires are so thin and they
dont make contact. You should solder thicker solid core wires to each wire,
to make good contact

Hardware Serial Wiring


If you have a device with hardware serial, you should use that instead. Often
this is pins #0 and #1
Next, you'll need to install the Adafruit Fingerprint sensor library (also
available from github).
Open up the Arduino Library Manager:

Type in Fingerprint until you see the Adafruit Fingerprint library show up!
Click Install! That's it. Now you should be able to select
theFile→Examples→Adafruit_Fingerprint→fingerprint example sketch.
Soft & Hard Serial
By default the sketch uses software serial (Arduino UNO & compatibles). If
you are using a device with Hardware Serial, e.g does not have a USB-Serial
converter chip, use that instead! Usually those are on pins 0 & 1
Download: file
Copy Code

1. // On Leonardo/Micro or others with hardware serial, use those! #0 is green


wire, #1 is white
2. // uncomment this line:
3. #define mySerial Serial1
4.
5. // For UNO and others without hardware serial, we must use software
serial...
6. // pin #2 is IN from sensor (GREEN wire)
7. // pin #3 is OUT from arduino (WHITE wire)
8. // comment these two lines if using hardware serial
9. //#include <SoftwareSerial.h>
10. //SoftwareSerial mySerial(2, 3);

If necessary, uncomment/comment lines for hardware serial support


Upload
Upload it to your Arduino as usual. Open up the serial monitor at 9600 baud
and when prompted place your finger against the sensor that was already
enrolled.

You should see the following:


The 'confidence' is a score number (from 0 to 255) that indicates how good
of a match the print is, higher is better. Note that if it matches at all, that
means the sensor is pretty confident so you don't have to pay attention to
the confidence number unless it makes sense for high security applications.
Of course you have to have enrolled a fingerprint first! If you did this using
the Windows program, that's good to go. If you have not yet, you should at
least have gotten a Found fingerprint sensor!printout. You can go ahead to
the next step to enroll fingerprints.
If you get Did not find fingerprint sensor :( check your wiring, maybe
swap the RX and TX wire as that's a common issue

If you want to have a more detailed report, change the loop() to


run getFingerprintID() instead ofgetFingerprintIDez() - that will give you a
detailed report of exactly what the sensor is detecting at each point of the
search process.
SEARCHING WITH THE SOFTWAREENROLLING WITH ARDUINO
This guide was first published on Nov 05, 2012. It was last updated on Nov 05, 2012.This page
(Wiring for use with Arduino) was last updated on Nov 14, 2018.
Fingerprint sensor
$49.95ADD TO CART

Adafruit METRO 328 Fully Assembled - Arduino IDE compatible


$17.50ADD TO CART

Breadboarding wire bundle


$4.95ADD TO CART

Related Guides
Securely hold your Arduino next to a breadboard

Arduino Prototyping Mounting Plate


by lady ada
Spice up your Arduino project with a beautiful large touchscreen
display shield with built in microSD card connection.

Adafruit 2.8" TFT Touch Shield v2 - Capacitive or Resistive


by lady ada
Binary numbers, Boolean logic, and logic gates.

Digital Circuits 1: Binary, Boolean, and Logic


by Dave Astels
Wiring up a character LCD to an Arduino

Character LCDs
by lady ada

• CONTACT

• SUPPORT

• DISTRIBUTORS

• EDUCATORS

• JOBS

• FAQ

• SHIPPING & RETURNS


• TERMS OF SERVICE

• PRIVACY & LEGAL

• ABOUT US
ENGINEERED IN NYC Adafruit ®

"The art of progress is to preserve order


amid change and to preserve change
amid order"- Alfred North Whitehead

Anda mungkin juga menyukai