Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown Fingerprint #2

Open
squareTop opened this issue Feb 1, 2018 · 0 comments
Open

Unknown Fingerprint #2

squareTop opened this issue Feb 1, 2018 · 0 comments

Comments

@squareTop
Copy link

I have tested the zfm20 using the SFGDemo windows application, and it works fine. However, when i use this package, and run the example code, I always get 'Unknown Fingerprint".

Example code (Connected to COM3):
var FingerPrint = require("zfm20"),
sensor;

sensor = new FingerPrint();

sensor.connect({
port : "COM3"
baudrate : 57600,
});

sensor.on("ready", function(){

sensor.read()
.ok(function(id){
    console.log("Fingerprint found! ID",id);
})
.fail(function () {
    console.log("Unknown fingerprint");
})
.wait(function(){
    console.log("Put fingerprint");
});

});

The connection is ok when i run this code:

var FingerPrint = require("zfm20"),
sensor;

sensor = new FingerPrint();

sensor.ports(function(port){
console.log(port); //check available port
});

Any advice?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant