🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Timer Camera X with Fingerprint FPC1020A

    Scheduled Pinned Locked Moved Arduino
    7 Posts 2 Posters 3.7k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L Offline
      Lubos22
      last edited by

      Hi guys please im having ESP32 PSRAM Timer Camera X and i bought Finger Print Sensor Unit (FPC1020A), please could someone help me create some test code if fingerprint sensor is working. Its connected via Grove Cable. I cant make it work.... like im not getting any value .. Maybe i just doing some mistake with rx, tx. i just dont know how to make it

      using this #include "M5_FPC1020A.h" library. #include "M5_FPC1020A.h"

      FingerPrint Finger;

      void setup() {
      Serial.begin(115200);
      delay(2000);

      Serial.println("FingerPrint Sensor Setup");
      
      
      uint8_t rx = 16;
      uint8_t tx = 17;
      
      Finger.begin(&Serial2, rx, tx);
      

      }

      void loop() {

      uint8_t addUserResult = Finger.fpm_addUser(1, 1);
      
      if (addUserResult == ACK_SUCCESS) {
          Serial.println("User added successfully!");
      } else {
          Serial.print("Failed to add user. Error code: ");
          Serial.println(addUserResult);
      }
      
      // Compare fingerprints
      
      uint8_t compareResult = Finger.fpm_compareFinger();
      
      if (compareResult == ACK_SUCCESS) {
          Serial.println("Fingerprints match!");
      } else if (compareResult == ACK_NOUSER) {
          Serial.println("No fingerprints enrolled.");
      } else if (compareResult == ACK_TIMEOUT) {
          Serial.println("Fingerprint matching timeout.");
      } else {
          Serial.print("Fingerprints do not match. Error code: ");
          Serial.println(compareResult);
      }
      
      delay(10000); 
      

      }

      1 Reply Last reply Reply Quote 0
      • felmueF Offline
        felmue
        last edited by

        Hello @Lubos22

        Timer Camera X Groove port is GPIO4 and GPIO13. See back of camera or pinmap here.

        Thanks
        Felix

        GPIO translation table M5Stack / M5Core2
        Information about various M5Stack products.
        Code examples

        1 Reply Last reply Reply Quote 0
        • L Offline
          Lubos22
          last edited by

          Thank you for your reply. So should i just change rx and tx ? uint8_t rx = 13;
          uint8_t tx = 4; Because i tried that Failed to add user. Error code: 1

          No fingerprints enrolled.
          
          Failed to add user. Error code: 1
          
          No fingerprints enrolled.
          
          Failed to add user. Error code: 1
          
          Fingerprints do not match. Error code: 1.
          

          Dont know ... What to do please help.

          1 Reply Last reply Reply Quote 0
          • felmueF Offline
            felmue
            last edited by

            Hello @Lubos22

            unfortunately I do not have a fingerprint unit to test with so I cannot say what else might be wrong. Sorry.

            Thanks
            Felix

            GPIO translation table M5Stack / M5Core2
            Information about various M5Stack products.
            Code examples

            1 Reply Last reply Reply Quote 0
            • L Offline
              Lubos22
              last edited by

              Thank you, Can anyone else help please?

              1 Reply Last reply Reply Quote 0
              • L Offline
                Lubos22
                last edited by

                void loop() {
                // Print the current add mode
                Serial.println(Finger.fpm_readAddMode());

                // Add a user with user number 21 and permission 1
                uint8_t addUserResult = Finger.fpm_addUser(21, 1);
                // Print the result of adding the user
                Serial.print("Add user result: ");
                Serial.println(addUserResult);

                // Print additional details for debugging
                for (int i = 0; i < 9; i++) {
                Serial.print("RxBuf[");
                Serial.print(i);
                Serial.print("]: ");
                Serial.println(Finger.RxBuf[i], HEX);
                }

                output when the finger is not placed on the fingerprint:
                1
                Add user result: 1
                RxBuf[0]: FF
                RxBuf[1]: 0
                RxBuf[2]: 0
                RxBuf[3]: 0
                RxBuf[4]: 0
                RxBuf[5]: 0
                RxBuf[6]: 0
                RxBuf[7]: 0
                RxBuf[8]: 0

                output when the finger is placed on the fingerprint:
                Add user result: 1
                RxBuf[0]: FF
                RxBuf[1]: FF
                RxBuf[2]: FF
                RxBuf[3]: FF
                RxBuf[4]: FF
                RxBuf[5]: FF
                RxBuf[6]: FF
                RxBuf[7]: FF
                RxBuf[8]: 0

                1 Reply Last reply Reply Quote 0
                • L Offline
                  Lubos22
                  last edited by

                  and when I try to test 100x by putting my finger... I have Add user result: 0 but the chance is 1/100. So could it be the fingerprint unit is broken?
                  User added successfully!
                  RxBuf[0]: F5
                  RxBuf[1]: 3
                  RxBuf[2]: 0
                  RxBuf[3]: 0
                  RxBuf[4]: 0
                  RxBuf[5]: 0
                  RxBuf[6]: 3
                  RxBuf[7]: F5
                  RxBuf[8]: 0
                  1

                  1 Reply Last reply Reply Quote 0

                  Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                  Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                  With your input, this post could be even better 💗

                  Register Login
                  • First post
                    Last post