I do a project based on the fingerprint sensor Sen0348 with the dedicated library dfrobot_id809 and an arduino uno R3
The problem is that the uno gives me the same error "Communication with device failed, please check connection" despite me following the wiring diagram of the sensor
How is it wired to the Uno?
What sketch are you using to get that response?
Edit: I took a look at the library. I see where you get that error.
If the library detects the board as an Uno, it uses SoftwareSerial on pins D2 and D3.
Just FYI
You'll probably need a board with a hardware serial port. I use a Mega2560. 4 serial ports.
115200 is too fast for SoftwareSerial.
Apparently that is why DFRobot recommends a Leonardo. From what I understand its Serial port is not connected to the USB port as on the Uno. Don't quote me.
I just looked at that library again. Try 9600 baud.
Edit: There is a function to change the baud rate. If that be the case, I'd start the device at the lowest. You want faster then you can get faster.
I would try this in setup() to increase baud rate.
I left the debug stuff in in case it doesn't work.
You might get a "Baud rate change failed" message once before it does connect.
i tried it and it says that "no matching function for call to 'DFRobot_ID809::begin()"
also heres is the full error : C:\Users\kosmas\AppData\Local\Temp.arduinoIDE-unsaved202459-4396-1625oqo.evpj\sketch_jun9a\sketch_jun9a.ino: In function 'void setup()':
C:\Users\kosmas\AppData\Local\Temp.arduinoIDE-unsaved202459-4396-1625oqo.evpj\sketch_jun9a\sketch_jun9a.ino:19:21: error: no matching function for call to 'DFRobot_ID809::begin()'
fingerprint.begin();
^
In file included from C:\Users\kosmas\AppData\Local\Temp.arduinoIDE-unsaved202459-4396-1625oqo.evpj\sketch_jun9a\sketch_jun9a.ino:1:0:
c:\Users\kosmas\Documents\Arduino\libraries\DFRobot_ID809-master/DFRobot_ID809.h:191:8: note: candidate: bool DFRobot_ID809::begin(Stream&)
bool begin(Stream &s_);
^~~~~
c:\Users\kosmas\Documents\Arduino\libraries\DFRobot_ID809-master/DFRobot_ID809.h:191:8: note: candidate expects 1 argument, 0 provided
C:\Users\kosmas\AppData\Local\Temp.arduinoIDE-unsaved202459-4396-1625oqo.evpj\sketch_jun9a\sketch_jun9a.ino:25:5: error: 'desc' was not declared in this scope
desc = fingerprint.getErrorDescription();
^~~~
C:\Users\kosmas\AppData\Local\Temp.arduinoIDE-unsaved202459-4396-1625oqo.evpj\sketch_jun9a\sketch_jun9a.ino:25:5: note: suggested alternative: 'getc'
desc = fingerprint.getErrorDescription();
^~~~
getc
C:\Users\kosmas\AppData\Local\Temp.arduinoIDE-unsaved202459-4396-1625oqo.evpj\sketch_jun9a\sketch_jun9a.ino:30:27: error: 'e38400bps' was not declared in this scope
fingerprint.setBaudrate(e38400bps);
^~~~~~~~~
C:\Users\kosmas\AppData\Local\Temp.arduinoIDE-unsaved202459-4396-1625oqo.evpj\sketch_jun9a\sketch_jun9a.ino:38:5: error: 'desc' was not declared in this scope
desc = fingerprint.getErrorDescription();
^~~~
C:\Users\kosmas\AppData\Local\Temp.arduinoIDE-unsaved202459-4396-1625oqo.evpj\sketch_jun9a\sketch_jun9a.ino:38:5: note: suggested alternative: 'getc'
desc = fingerprint.getErrorDescription();
^~~~
getc
exit status 1
Compilation error: no matching function for call to 'DFRobot_ID809::begin()'
I had the same problem and I didn't understand what was happening. After several days of testing, I found that it was a problem with the JST connector that makes false contact. Try disconnecting and connecting it several times until the LEDs on the sensor ring light up. That was my solution.
PD: I bought 3 sensor units and only one worked, the other two never turned on, I hope that helps you.