I'm trying to send a command to my fingerprint scanner (turn on its LED) but it doesnt seem to ack it. The FPS is set to 115200bps connection.
I tested its sample program by uploading a blank sketch in my Arduino Mini and connecting its pins to RX/TX and the board to PC via USB. The program was helpful enough to display the hex codes its using in sending commands.
Here is the command to turn on the sensor LED:
0x55, 0xAA, 0x24, 0x01, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x01
And here is the command packet structure :
PREFIX | COMMAND | LEN | DATA | CHK |
---|---|---|---|---|
0x55 0xAA | 0x24 0x01 | 0x02 0x00 | 0x01 0x00 ... 0x00 | 0x27 0x01 |
And here is my test code :
/** Turn on the LED **/
byte ledturnon[] = {
0x55, 0xAA, 0x24, 0x01, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x01};
void setup()
{
Serial.begin(115200);
Serial.println("Begin Connection");
Serial.write(ledturnon, 24);
}
void loop(){
}