esp32 cam with fingerprint reader

stino18
Posts: 2
Joined: Sat Jan 22, 2022 7:23 pm

esp32 cam with fingerprint reader

Postby stino18 » Sun Jan 23, 2022 2:58 pm

I am still fairly new to working with an esp32 cam and I have a question. Hopefully someone can help me.

I would like to connect my fingerprint reader to my esp32 cam and also use the adafruit fingerprint library. I just don't know which pins to use and how to indicate this in the arduino sketch. can someone help me with this?

ESP_LJH
Posts: 163
Joined: Tue May 18, 2021 9:21 am

Re: esp32 cam with fingerprint reader

Postby ESP_LJH » Mon Jan 24, 2022 6:32 am

Which interface do you use? UART? SPI? I2C?
You could refer to 4.2 Peripheral Pin Configurations in ESP32 Datasheet and see which pins you should use.

alanesq
Posts: 80
Joined: Thu Dec 14, 2017 8:38 pm

Re: esp32 cam with fingerprint reader

Postby alanesq » Mon Jan 24, 2022 7:33 am

Hi,

The available pins are very limited on the esp32cam, my best understanding is:
If using the sd card (must be in 1-bit mode) the main io pins available for general use are 13 and 12 (12 must not be high at boot),
14, 2 & 15 should also be available if you are not using the SD Card.
You can also use pins 1 and 3 if you do not use Serial (looks like they are restricted to one being input only and the other output only?)
Pin 4 is the onboard flash LED which you could possibly remove and use this pin for output (it is via a transistor) but again sd card needs to be in 1-bit mode if you are using it otherwise the sd-card uses pin 4. pin 33 is another onboard led which could possibly be used?

BTW - I have a sketch (Arduino) where I try to implement everything I discover about using them which may be of interest: https://github.com/alanesq/esp32cam-demo

Looks like some good info here: https://github.com/raphaelbs/esp32-cam- ... p32-cam.md

stino18
Posts: 2
Joined: Sat Jan 22, 2022 7:23 pm

Re: esp32 cam with fingerprint reader

Postby stino18 » Thu Jan 27, 2022 12:32 pm

Thank you for your answers.
If i want to use pin 12 and 13 for communication with the sensor, what do i need to change in the code so i can use these pins?

#include <Adafruit_Fingerprint.h>


#if (defined(__AVR__) || defined(ESP8266)) && !defined(__AVR_ATmega2560__)
// 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);

#else
// On Leonardo/M0/etc, others with hardware serial, use hardware serial!
// #0 is green wire, #1 is white
#define mySerial Serial1

#endif


Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial);

Who is online

Users browsing this forum: No registered users and 15 guests