Hi everyone
Can I use Adafruit Fingerprint sensor library for R503 fingerprint module?
If this "Adafruit Fingerprint sensor" is simply a rebranded R503, then yes. Otherwise, probably no.
Easy enough to find out, don't you think? Just wire it up!
I haven't bought the sensor yet
I wanted to make sure the sensor worked before buying
i have this sonsor with adafruit library cheking dosent work baut enregistering work.
i have searching for long time and i find this work for esp 8266 i have made same modification it work good.
///////////////////////registering code ///////////////
#include <SoftwareSerial.h>
SoftwareSerial myserial(2,3); //RX,TX
byte handshake[13]={0xEF,0x01 ,0xFF ,0xFF ,0xFF ,0xFF ,0x01 ,0x00 ,0x04 ,0x17 ,0x00 ,0x00 ,0x1c};
byte getimg[12]={0xEF, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x03, 0x01, 0x00, 0x05};
byte img2tz1[13]={0xEF, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x04, 0x02, 0x01, 0x00, 0x08};
byte img2tz2[13]={0xEF, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x04, 0x02, 0x02, 0x00, 0x09};
byte regmodel[12]={0xEF, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x03, 0x05, 0x00, 0x09};
byte store[15]={0xEF, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x06, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00};
byte search[17]={0xEF, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x08, 0x04, 0x01, 0x00, 0x00, 0x00, 0xff, 0x01, 0x0d};
byte load[15]={0xEF, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x06, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00};
int REGISTRY_ID=0;
int Buffer[25];
//////////////////////////////////////////////////////////
void clearBuffer()
{
for(int i=0; i<25;i++)Buffer[i]=0xff;
//for(int i=0;i<10;i++)myserial.read();
}
//////////////////////////////////////////////////////////
int fpStart()
{
int i=0;
for(i=0; i<13; i++)
{
myserial.write(handshake[i]);
}
while(!myserial.available());
i=0;
while(i<12)
{
if(myserial.available())
{
Buffer[i]=myserial.read();
i++;
}
}
if(Buffer[9]==0)
{
clearBuffer();
return 1;
}
else
{
clearBuffer();
return 0;
}
}
//////////////////////////////////////////////////////////
int readFinger()
{
int i=0;
for(i=0; i<12; i++)
{
myserial.write(getimg[i]);
}
while(!myserial.available());
i=0;
while(i<12)
{
if(myserial.available())
{
Buffer[i]=myserial.read();
i++;
}
}
if(Buffer[9]==0)
{
clearBuffer();
return 1;
}
else if(Buffer[9]==1 || Buffer[9]==3)
{
clearBuffer();
return 2;
}
else
{
clearBuffer();
return 0;
}
}
//////////////////////////////////////////////////////////
int convertToCharArray()
{
int i=0;
for(i=0; i<13; i++)
{
myserial.write(img2tz1[i]);
}
while(!myserial.available());
i=0;
while(i<12)
{
if(myserial.available())
{
Buffer[i]=myserial.read();
i++;
}
}
if(Buffer[9]==0)
{
clearBuffer();
return 1;
}
else
{
clearBuffer();
return 0;
}
}
//////////////////////////////////////////////////////////
int convertToCharArray2()
{
int i=0;
for(i=0; i<13; i++)
{
myserial.write(img2tz2[i]);
}
while(!myserial.available());
i=0;
while(i<12)
{
if(myserial.available())
{
Buffer[i]=myserial.read();
i++;
}
}
if(Buffer[9]==0)
{
clearBuffer();
return 1;
}
else
{
clearBuffer();
return 0;
}
}
//////////////////////////////////////////////////////////
int showData(int pageid)
{
int i=0;
int sum=0;
byte pageid1,pageid2;
byte sum1,sum2;
pageid1=(pageid>>8)&0x00ff;
pageid2=(pageid&0x00ff);
load[11]=pageid1;
load[12]=pageid2;
for(i=6; i<13; i++)
{
sum+=load[i];
}
sum1=(sum>>8)&0x00ff;
sum2=(sum&0x00ff);
load[13]=sum1;
load[14]=sum2;
for(i=0; i<15; i++)
{
myserial.write(load[i]);
}
while(!myserial.available());
i=0;
while(i<12)
{
if(myserial.available())
{
Buffer[i]=myserial.read();
i++;
}
}
if(Buffer[9]==0)
{
clearBuffer();
return 1;
}
else
{
clearBuffer();
return 0;
}
}
//////////////////////////////////////////////////////////
int createTemplate()
{
int i=0;
for(i=0; i<12; i++)
{
myserial.write(regmodel[i]);
}
while(!myserial.available());
i=0;
while(i<12)
{
if(myserial.available())
{
Buffer[i]=myserial.read();
i++;
}
}
if(Buffer[9]==0)
{
clearBuffer();
return 1;
}
else
{
clearBuffer();
return 0;
}
}
//////////////////////////////////////////////////////////
int createRegistry(int pageid)
{
int i=0;
int sum=0;
byte pageid1,pageid2;
byte sum1,sum2;
pageid1=(pageid>>8)&0x00ff;
pageid2=(pageid&0x00ff);
store[11]=pageid1;
store[12]=pageid2;
for(i=6; i<13; i++)
{
sum+=store[i];
}
sum1=(sum>>8)&0x00ff;
sum2=(sum&0x00ff);
store[13]=sum1;
store[14]=sum2;
for(i=0; i<15; i++)
{
myserial.write(store[i]);
}
while(!myserial.available());
i=0;
while(i<12)
{
if(myserial.available())
{
Buffer[i]=myserial.read();
i++;
}
}
if(Buffer[9]==0)
{
clearBuffer();
return 1;
}
else
{
clearBuffer();
return 0;
}
}
{Next time, please use the Code tags button </> in the menu. Thanks, Moderator}
Can You Explain Step by Step Please...thanks..
AdameMoroccain:
i have this sonsor with adafruit library cheking dosent work baut enregistering work.
i have searching for long time and i find this work for esp 8266 i have made same modification it work good.///////////////////////registering code ///////////////
#include <SoftwareSerial.h>
SoftwareSerial myserial(2,3); //RX,TX
byte handshake[13]={0xEF,0x01 ,0xFF ,0xFF ,0xFF ,0xFF ,0x01 ,0x00 ,0x04 ,0x17 ,0x00 ,0x00 ,0x1c};
byte getimg[12]={0xEF, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x03, 0x01, 0x00, 0x05};
byte img2tz1[13]={0xEF, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x04, 0x02, 0x01, 0x00, 0x08};
byte img2tz2[13]={0xEF, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x04, 0x02, 0x02, 0x00, 0x09};
byte regmodel[12]={0xEF, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x03, 0x05, 0x00, 0x09};
byte store[15]={0xEF, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x06, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00};
byte search[17]={0xEF, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x08, 0x04, 0x01, 0x00, 0x00, 0x00, 0xff, 0x01, 0x0d};
byte load[15]={0xEF, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x06, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00};
int REGISTRY_ID=0;
int Buffer[25];
//////////////////////////////////////////////////////////
void clearBuffer()
{
for(int i=0; i<25;i++)Buffer[i]=0xff;
//for(int i=0;i<10;i++)myserial.read();
}
//////////////////////////////////////////////////////////
int fpStart()
{
int i=0;
for(i=0; i<13; i++)
{
myserial.write(handshake[i]);
}
while(!myserial.available());
i=0;
while(i<12)
{
if(myserial.available())
{
Buffer[i]=myserial.read();
i++;
}
}
if(Buffer[9]==0)
{
clearBuffer();
return 1;
}
else
{
clearBuffer();
return 0;
}
}
//////////////////////////////////////////////////////////
int readFinger()
{
int i=0;
for(i=0; i<12; i++)
{
myserial.write(getimg[i]);
}
while(!myserial.available());
i=0;
while(i<12)
{
if(myserial.available())
{
Buffer[i]=myserial.read();
i++;
}
}
if(Buffer[9]==0)
{
clearBuffer();
return 1;
}
else if(Buffer[9]==1 || Buffer[9]==3)
{
clearBuffer();
return 2;
}
else
{
clearBuffer();
return 0;
}
}
//////////////////////////////////////////////////////////
int convertToCharArray()
{
int i=0;
for(i=0; i<13; i++)
{
myserial.write(img2tz1[i]);
}
while(!myserial.available());
i=0;
while(i<12)
{
if(myserial.available())
{
Buffer[i]=myserial.read();
i++;
}
}
if(Buffer[9]==0)
{
clearBuffer();
return 1;
}
else
{
clearBuffer();
return 0;
}
}
//////////////////////////////////////////////////////////
int convertToCharArray2()
{
int i=0;
for(i=0; i<13; i++)
{
myserial.write(img2tz2[i]);
}
while(!myserial.available());
i=0;
while(i<12)
{
if(myserial.available())
{
Buffer[i]=myserial.read();
i++;
}
}
if(Buffer[9]==0)
{
clearBuffer();
return 1;
}
else
{
clearBuffer();
return 0;
}
}
//////////////////////////////////////////////////////////
int showData(int pageid)
{
int i=0;
int sum=0;
byte pageid1,pageid2;
byte sum1,sum2;
pageid1=(pageid>>8)&0x00ff;
pageid2=(pageid&0x00ff);
load[11]=pageid1;
load[12]=pageid2;
for(i=6; i<13; i++)
{
sum+=load[i];
}
sum1=(sum>>8)&0x00ff;
sum2=(sum&0x00ff);
load[13]=sum1;
load[14]=sum2;
for(i=0; i<15; i++)
{
myserial.write(load[i]);
}
while(!myserial.available());
i=0;
while(i<12)
{
if(myserial.available())
{
Buffer[i]=myserial.read();
i++;
}
}
if(Buffer[9]==0)
{
clearBuffer();
return 1;
}
else
{
clearBuffer();
return 0;
}
}
//////////////////////////////////////////////////////////
int createTemplate()
{
int i=0;
for(i=0; i<12; i++)
{
myserial.write(regmodel[i]);
}
while(!myserial.available());
i=0;
while(i<12)
{
if(myserial.available())
{
Buffer[i]=myserial.read();
i++;
}
}
if(Buffer[9]==0)
{
clearBuffer();
return 1;
}
else
{
clearBuffer();
return 0;
}
}
//////////////////////////////////////////////////////////
int createRegistry(int pageid)
{
int i=0;
int sum=0;
byte pageid1,pageid2;
byte sum1,sum2;
pageid1=(pageid>>8)&0x00ff;
pageid2=(pageid&0x00ff);
store[11]=pageid1;
store[12]=pageid2;
for(i=6; i<13; i++)
{
sum+=store[i];
}
sum1=(sum>>8)&0x00ff;
sum2=(sum&0x00ff);
store[13]=sum1;
store[14]=sum2;
for(i=0; i<15; i++)
{
myserial.write(store[i]);
}
while(!myserial.available());
i=0;
while(i<12)
{
if(myserial.available())
{
Buffer[i]=myserial.read();
i++;
}
}
if(Buffer[9]==0)
{
clearBuffer();
return 1;
}
else
{
clearBuffer();
return 0;
}
}
{Next time, please use the Code tags button </> in the menu. Thanks, Moderator}
I also have a problem with R503 using Arduino boad.it didnt work
I have buy this sensor from china, try to interface with arduino using adafruit library. Enroll worked for me, but after fingerprint read nothing. I try to find it on web and video but nothing until i watch teacheable video on youtube that open my mind. Here is the link
engamanc:
I haven't bought the sensor yet
I wanted to make sure the sensor worked before buying
i advice you totry it. It is really worked
adicrash:
I have buy this sensor from china, try to interface with arduino using adafruit library. Enroll worked for me, but after fingerprint read nothing. I try to find it on web and video but nothing until i watch teacheable video on youtube that open my mind. Here is the link
Hello, I am a beginner in arduino and I purchased an R503 but I am a bit lost as to the connections to the arduino. Should I connect all wires or just "red - 3.3V", "Black - GND", "Green-RX" and "Yellow-TX"? If I must connect the other 2 too, which pin do I connect to? Can the red be at 5V?
Sorry, the questions are simple but I was afraid to burn it
Red wire should be to 3.3v, the blue wire just touch sensor, touch sensor standby high and changed be low when touching, use white wire as supply range 3.3-5 volt. This white wire optional just use when you need to activate something using the touch sensor
hi can you help me to control the led on R503, I have successfully used the sensor but the indicator led is not working