AS608 Fingerprint Sensor Not Working with Arduino UNO R4 Wifi Official

Greetings!
A few days ago, I bought an AS608 fingerprint module from a local supplier. When I tried to test it on my official Arduino UNO R4 Wifi, it failed to establish communication with it. I also tried to do the same with my ESP32-WROOM-32D that I have at home, but it also failed.
I then tried to upload a blank code to my Arduino to connect the sensor directly to the TX and RX ports, in an attempt to make it communicate with the SFGdemo program on the computer, but it failed again.

One thing I noticed is that the sensor's LED only turns on when it is connected to the Arduino's 5V, and not to the 3V3 as expected.

Here is the code used, any suggestions on what it could be???

/***************************************************
  This is an example sketch for our optical Fingerprint sensor

  Designed specifically to work with the Adafruit BMP085 Breakout
  ----> http://www.adafruit.com/products/751

  These displays use TTL Serial to communicate, 2 pins are required to
  interface
  Adafruit invests time and resources providing this open source code,
  please support Adafruit and open-source hardware by purchasing
  products from Adafruit!

  Written by Limor Fried/Ladyada for Adafruit Industries.  
  Small bug-fix by Michael cochez

  BSD license, all text above must be included in any redistribution
 ****************************************************/

#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);

uint8_t id;

void setup()
{
  Serial.begin(115200);
  while (!Serial);  // For Yun/Leo/Micro/Zero/...
  delay(100);
  Serial.println("\n\nAdafruit Fingerprint sensor enrollment");

  // set the data rate for the sensor serial port
  finger.begin(9600);

  if (finger.verifyPassword()) {
    Serial.println("Found fingerprint sensor!");
  } else {
    Serial.println("Did not find fingerprint sensor :(");
    while (1) { delay(1); }
  }

  Serial.println(F("Reading sensor parameters"));
  finger.getParameters();
  Serial.print(F("Status: 0x")); Serial.println(finger.status_reg, HEX);
  Serial.print(F("Sys ID: 0x")); Serial.println(finger.system_id, HEX);
  Serial.print(F("Capacity: ")); Serial.println(finger.capacity);
  Serial.print(F("Security level: ")); Serial.println(finger.security_level);
  Serial.print(F("Device address: ")); Serial.println(finger.device_addr, HEX);
  Serial.print(F("Packet len: ")); Serial.println(finger.packet_len);
  Serial.print(F("Baud rate: ")); Serial.println(finger.baud_rate);
}

uint8_t readnumber(void) {
  uint8_t num = 0;

  while (num == 0) {
    while (! Serial.available());
    num = Serial.parseInt();
  }
  return num;
}

void loop()                     // run over and over again
{
  Serial.println("Ready to enroll a fingerprint!");
  Serial.println("Please type in the ID # (from 1 to 127) you want to save this finger as...");
  id = readnumber();
  if (id == 0) {// ID #0 not allowed, try again!
     return;
  }
  Serial.print("Enrolling ID #");
  Serial.println(id);

  while (! getFingerprintEnroll() );
}

uint8_t getFingerprintEnroll() {

  int p = -1;
  Serial.print("Waiting for valid finger to enroll as #"); Serial.println(id);
  while (p != FINGERPRINT_OK) {
    p = finger.getImage();
    switch (p) {
    case FINGERPRINT_OK:
      Serial.println("Image taken");
      break;
    case FINGERPRINT_NOFINGER:
      Serial.print(".");
      break;
    case FINGERPRINT_PACKETRECIEVEERR:
      Serial.println("Communication error");
      break;
    case FINGERPRINT_IMAGEFAIL:
      Serial.println("Imaging error");
      break;
    default:
      Serial.println("Unknown error");
      break;
    }
  }

  // OK success!

  p = finger.image2Tz(1);
  switch (p) {
    case FINGERPRINT_OK:
      Serial.println("Image converted");
      break;
    case FINGERPRINT_IMAGEMESS:
      Serial.println("Image too messy");
      return p;
    case FINGERPRINT_PACKETRECIEVEERR:
      Serial.println("Communication error");
      return p;
    case FINGERPRINT_FEATUREFAIL:
      Serial.println("Could not find fingerprint features");
      return p;
    case FINGERPRINT_INVALIDIMAGE:
      Serial.println("Could not find fingerprint features");
      return p;
    default:
      Serial.println("Unknown error");
      return p;
  }

  Serial.println("Remove finger");
  delay(2000);
  p = 0;
  while (p != FINGERPRINT_NOFINGER) {
    p = finger.getImage();
  }
  Serial.print("ID "); Serial.println(id);
  p = -1;
  Serial.println("Place same finger again");
  while (p != FINGERPRINT_OK) {
    p = finger.getImage();
    switch (p) {
    case FINGERPRINT_OK:
      Serial.println("Image taken");
      break;
    case FINGERPRINT_NOFINGER:
      Serial.print(".");
      break;
    case FINGERPRINT_PACKETRECIEVEERR:
      Serial.println("Communication error");
      break;
    case FINGERPRINT_IMAGEFAIL:
      Serial.println("Imaging error");
      break;
    default:
      Serial.println("Unknown error");
      break;
    }
  }

  // OK success!

  p = finger.image2Tz(2);
  switch (p) {
    case FINGERPRINT_OK:
      Serial.println("Image converted");
      break;
    case FINGERPRINT_IMAGEMESS:
      Serial.println("Image too messy");
      return p;
    case FINGERPRINT_PACKETRECIEVEERR:
      Serial.println("Communication error");
      return p;
    case FINGERPRINT_FEATUREFAIL:
      Serial.println("Could not find fingerprint features");
      return p;
    case FINGERPRINT_INVALIDIMAGE:
      Serial.println("Could not find fingerprint features");
      return p;
    default:
      Serial.println("Unknown error");
      return p;
  }

  // OK converted!
  Serial.print("Creating model for #");  Serial.println(id);

  p = finger.createModel();
  if (p == FINGERPRINT_OK) {
    Serial.println("Prints matched!");
  } else if (p == FINGERPRINT_PACKETRECIEVEERR) {
    Serial.println("Communication error");
    return p;
  } else if (p == FINGERPRINT_ENROLLMISMATCH) {
    Serial.println("Fingerprints did not match");
    return p;
  } else {
    Serial.println("Unknown error");
    return p;
  }

  Serial.print("ID "); Serial.println(id);
  p = finger.storeModel(id);
  if (p == FINGERPRINT_OK) {
    Serial.println("Stored!");
  } else if (p == FINGERPRINT_PACKETRECIEVEERR) {
    Serial.println("Communication error");
    return p;
  } else if (p == FINGERPRINT_BADLOCATION) {
    Serial.println("Could not store in that location");
    return p;
  } else if (p == FINGERPRINT_FLASHERR) {
    Serial.println("Error writing to flash");
    return p;
  } else {
    Serial.println("Unknown error");
    return p;
  }

  return true;
}

The code says it is for the BMP085.

Install the library for the fingerprint reader. Then find the sensor's examples: IDE >> FILES >> EXAMPLES >> your sensor

Hello!
Can you informe me what is the library?

You should have learned about libraries in the first day of programming.

A library (file or files) is a layer of software that makes your job of programming electronics easier to communicate with the hardware.

In your posted code, this is the library:

Adafruit_Fingerprint.h

However, because you say this does not work, I think you need a library specific to your device, the AS608.

You can find libraries to support your device if you enter the Library Manager and enter "AS608"

You can also find libraries of you add a ".h" to the device name in a search or search "device library."

I missed the issue of R4 not having full library support, meaning, libraries that work with previous generations of Uno, do not work with R4.

Dude, I know what libraries are, the problem is that there are very few sources of research about this specific module. The only datasheet I found for this module instructed the use of this Adafruit library. The question was if you knew of any specific library for this module, something I didn't find, I even imagined that it could be that, but I wasn't sure. That's why I made this post here.

Yes, this is a very big difficulty that I encountered when purchasing this Arduino, especially for carrying out these projects.


nothing...

Why, then, did y You indicated you did not.

I am not, "dude."

Sorry for been 'rude' with you, i'm not a english native speaker and i was using google translater to send messages. In Brazil, we use "friend" as an affectionate form of address, unfortunately Google Translate translated it to "dude", if this offended you, I apologize, but i don't know your name, xfpd.

I wrote this sentence improvised, as I said, I'm not good at English, so if it sounded like I said I didn't know what a library is, I apologize.

I'm not good at programming, but I know the basics, especially about libraries.
I came to ask for help to solve my problem, as it is the first time I have worked with this specific module and I didn't know what to do.
I didn't come to be evaluated or lectured about how bad I am in this area, I just came to solve my problem.

I ask for forgiveness if I offended you in anything, above all.

Thank you, I will try to use this library for my code.

Yes... this is true. The link I posted in post #10 has a library, but it is not good. A good library for learning will have an "examples" folder.

Search for "AS608.h" or "AS608 library" and keep trying different libraries.

That is funny. I use translate, too. I must sound rude in every translation... more so that I sound in English.

Welcome 'dude' from Brazil :upside_down_face:

One thing comes to mind here, are the sensor and Uno working with the same voltage level?

Hello! Some time ago, I noticed that when I connected the R4 board to the computer, the 5V pin did not show this exact voltage. There was, in fact, a voltage drop from what was promised by the board, this is contained in the Arduino UNO R4 Wifi datasheet.
I thought about it, I connected the module's power supply to a source that would provide exactly 5V, but I was unsuccessful.
I am thinking of asking for a refund for this module and buying another one that is easier to handle, any suggestions for a module?

That's not what I'm getting at, if the sensors signal voltage is 5 V and your Uno is at 3.3 V you have a problem. So even if your Uno have a 5 V pin doesn't mean it accepts 5 V on the I/O pins. Or it could work with both voltages... (Some boards accept both)

About 5 V not being exakt, some deviation is accepted. Many PC psu's 12 V rail can be 11.9 for example.