Fingerprint Reader and serial pass through


#21

@Hootie81, there IS a difference between using <> and " " for #includes and it has to do with where the compiler searches for the file. Here is the “official” definition:

Quoted form : This form instructs the preprocessor to look for include files in the same directory of the file that contains the #include statement, and then in the directories of any files that include (#include) that file. The preprocessor then searches along the path specified by the /I compiler option, then along paths specified by the INCLUDE environment variable.

Angle-bracket form : This form instructs the preprocessor to search for include files first along the path specified by the /I compiler option, then, when compiling from the command line, along the path specified by the INCLUDE environment variable

So to search for a file in the “current” directory along with the compiler specified path, you need to use quotes. :smile:


#22

Well that makes perfect sense for the way I was doing it then now I need to try and get all the hardware working together… I remember reading about spi speeds changing between the digole and the SD card sounded like a reasonably easy fix to make if it hasn’t been corrected already.

I did have a little issue with the print reader today… When doing the serial pass thru and enrolling prints consecutively it came up with a strange error and couldn’t enroll the prints so I clicked the capture image button and the picture was half of one print and half of another. I tried flashing different firmware to see how it works. Just the normal reader example, without power cycling the fingerprint reader. It didn’t throw any errors but it couldn’t find any prints. Cycling the power off and on fixed it first go


#23

@Hootie81, we have not found a solid fix for the Digole/SD SPI mode change yet. You may want to put the Digole on I2C to avoid the problem entirely. Soon, there will also be a second serial port available, making it even easier to hook up.

The serial passthrough is very basic code and Serial1 is not truly hardware implemented so it can drop data occasionally. This is perhaps what happened though the outcome was kinda weird :open_mouth:


#24

I also plan on hooking up an RFID-RC522 that also uses SPI… so will have to play a bit and see what i can get to work.

As for the DB… im thinking of using this…

http://blog.brauingenieur.de/2014/01/20/extended-database-library-using-an-sd-card/

Ill see what i can hack together and make work :wink:


#25

Hi i am also working on a project using the arduino finger print scanner
I made use of the codes @peekay123 provided, i also tried using one of the examples provided…
but i get a compile error please how can i go about this

In file included from ../inc/spark_wiring.h:29:0,
from ../inc/application.h:29,
from Adafruit_Fingerprint.h:18,
from Adafruit_Fingerprint.cpp:19:
../../core-common-lib/SPARK_Firmware_Driver/inc/config.h:12:2: warning: #warning "Defaulting to Release Build" [-Wcpp]
#warning "Defaulting to Release Build"
^
In file included from Adafruit_Fingerprint.cpp:19:0:
Adafruit_Fingerprint.h:27:23: fatal error: WProgram.h: No such file or directory
#include "WProgram.h"
^
compilation terminated.
make: *** [Adafruit_Fingerprint.o] Error 1

Error: Could not compile. Please review your code.

#26

to clarify i copied and pasted the exact codes from @peekay123 and did not make any changes


#27

@Tk_Yussuff, I must have had a brain fart when I prepared that library for the web IDE cause it had a bunch of issues. I now fixed all those and published the library to the IDE so you can use it there. Let me know how it goes! :smile:


#28

Yeah i remember just removing a whole bunch of arduino stuff to get it working… it has been a while since i played with the reader, but was working perfectly, much better than my commercial one installed at my house.

i did start noticing some little glitches that had me stumped but it turned out to be a loose connection in the breadboard!


#29

@Hootie81 for some reason my finger print scanner cannot be powered using the 3.3v or 3.3v* did you encounter this problem by any chance


#30

i used the 3v3* line as you can see in the video above, didn’t notice any issues besides a bad connection in the breadboard would cause the reader to not respond. that was a bad connection though not a power issue


#31

Can some one tell me if i get the template of a fingerprint using showtemplate code and then i want to use it to match my fingerprint with another template.how i should do that.
and what finger.image2tz and finger.creatmodel does?


#32

hello am trying to use my photon and the fingerprint that u having .
am trying to use the code but none of them is compiling .
is this code gunna work just for spark or it can be use for photon also?thanks .


#33

what is the reason for this code

    '#include "application.h"
    
    void setup()  
    {
      // Open serial communications and wait for port to open:
      Serial.begin(57600);
      Serial1.begin(57600);
    
    }
    
    void loop() // run over and over
    {
      while (Serial1.available())
        Serial.write(Serial1.read());
      while (Serial.available())
        Serial1.write(Serial.read());
    }

#34

When mentioning something like

You should never forget to provide more info about what’s not compiling - e.g. error messages

That code will pass data between USB serial and RX/TX serial interfaces


#35

sorry about that sir u right .
am confused about it .
so do i have to use the TTL serial to communicate ?
i cant use the the photon and the fingerprint the photon has the RX/TX
correct me if am wrong
thanks


#36

am using peekay lib the one he provided and am getting this error for the enrol code

Adafruit_Fingerprint.cpp: In member function 'boolean Adafruit_Fingerprint::verifyPassword()':
Adafruit_Fingerprint.cpp:56:36: warning: narrowing conversion of '(((Adafruit_Fingerprint*)this)->Adafruit_Fingerprint::thePassword >> 24)' from 'uint32_t {aka long unsigned int}' to 'uint8_t {aka unsigned char}' inside { } [-Wnarrowing]
                       (thePassword >> 24), (thePassword >> 16),
                                    ^
Adafruit_Fingerprint.cpp:56:57: warning: narrowing conversion of '(((Adafruit_Fingerprint*)this)->Adafruit_Fingerprint::thePassword >> 16)' from 'uint32_t {aka long unsigned int}' to 'uint8_t {aka unsigned char}' inside { } [-Wnarrowing]
                       (thePassword >> 24), (thePassword >> 16),
                                                         ^
Adafruit_Fingerprint.cpp:57:36: warning: narrowing conversion of '(((Adafruit_Fingerprint*)this)->Adafruit_Fingerprint::thePassword >> 8)' from 'uint32_t {aka long unsigned int}' to 'uint8_t {aka unsigned char}' inside { } [-Wnarrowing]
                       (thePassword >> 8), thePassword};
                                    ^
Adafruit_Fingerprint.cpp:57:54: warning: narrowing conversion of '((Adafruit_Fingerprint*)this)->Adafruit_Fingerprint::thePassword' from 'uint32_t {aka long unsigned int}' to 'uint8_t {aka unsigned char}' inside { } [-Wnarrowing]
                       (thePassword >> 8), thePassword};
                                                      ^
Adafruit_Fingerprint.cpp: In member function 'uint8_t Adafruit_Fingerprint::storeModel(uint16_t)':
Adafruit_Fingerprint.cpp:107:51: warning: narrowing conversion of '(((int)id) >> 8)' from 'int' to 'uint8_t {aka unsigned char}' inside { } [-Wnarrowing]
   uint8_t packet[] = {FINGERPRINT_STORE, 0x01, id >> 8, id & 0xFF};
                                                   ^
Adafruit_Fingerprint.cpp:107:60: warning: narrowing conversion of '(((int)id) & 255)' from 'int' to 'uint8_t {aka unsigned char}' inside { } [-Wnarrowing]
   uint8_t packet[] = {FINGERPRINT_STORE, 0x01, id >> 8, id & 0xFF};
                                                            ^
Adafruit_Fingerprint.cpp: At global scope:
Adafruit_Fingerprint.cpp:117:54: error: no 'uint8_t Adafruit_Fingerprint::deleteModel(uint16_t)' member function declared in class 'Adafruit_Fingerprint'
 uint8_t Adafruit_Fingerprint::deleteModel(uint16_t id) {
                                                      ^

make[1]: *** [../build/target/user/platform-6Adafruit_Fingerprint.o] Error 1
make: *** [user] Error 2

#37

am using this fingerprint
Fingerprint Sensor: http://bit.ly/FingerPrintSensor


#38

This is the error you need to address

Adafruit_Fingerprint.cpp: At global scope:
Adafruit_Fingerprint.cpp:117:54: error: no 'uint8_t Adafruit_Fingerprint::deleteModel(uint16_t)' member function declared in class 'Adafruit_Fingerprint'
 uint8_t Adafruit_Fingerprint::deleteModel(uint16_t id) {

@peekay123, can you push a version that incorporates this PR to Build?


#39

but this code works for photon or its just for spark


#40

It should work for both just the same.