por defecto los conecte a la placa arduino ,tal como indica el fabricante
Pin . Name Type Function Description
1 VTouth Out finger detection power output+ ( no se conecta al arduino)
2 TSingle Out finger detection signal output no se conecta AL ARDUINO)
3 Vin in input power positive.
4 TD out TTL logic levels.
5 RD in serial data input. TTL logic levels.
6 GND Signal ground.
compilo el ejemplo ,pero solo pestañea el sensor pero al ver el monitor serie ,dice que no se encuentra..
adjunto lecturas
Hola, solo tu sabes de que sensor hablas porque tu post no dice: Compre el sensor de Adafruit modelo tal y tal.
intenta ser un poco mas específicio please!!
Además los links se postean usando los tags. Lee las normas del foro.
En las normas dice como postear links.
Como me lo pides amablemente te lo respondo pero pensaba el tiempo que pierdo respondiendo a cada persona que entra al foro y que una y otra vez no leen las normas.
Aca dice como poner enlaces. Usas ese tag y te pedirá la url, la introduces (previamente capturada con CONTROL+C o Copiar) y luego pones una Etiqueta que sera la parte visible.
Luego de hacerlo verás el código HTML y puedes editar una vez mas.
Tal vez tengas invertidos TX y RX. Si no me equivoco, el ejemplo instancia
SoftwareSerial mySerial(2, 3);
Es decir, pin 2 para RX y pin 3 para TX. Por tanto el pin 2 debería ir conectado al TD y el 3 al RD (por el cable que uno "habla", el otro "escucha", y viceversa)
Nunca pusiste código. Eso es básico en estos post. Empiezas contando todo y pones el código que supuestamente no funciona y todos podemos ver y analizar mejor las cosas.
Igualmente felicitaciones por el éxito.
cuando encuentra el sensor avisa con un led y un buzzer ,al poner la huella se agrega el ide..
#include <Adafruit_Fingerprint.h>
#include <SoftwareSerial.h>
uint8_t getFingerprintEnroll(uint8_t id);
// pin #2 is IN from sensor (GREEN wire)
// pin #3 is OUT from arduino (WHITE wire)
SoftwareSerial mySerial(2, 3);
Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial);
void setup()
{
pinMode(12, OUTPUT);
Serial.begin(9600);
Serial.println("fingertest");
// set the data rate for the sensor serial port
finger.begin(57600);
if (finger.verifyPassword()) {
Serial.println("Found fingerprint sensor!");
digitalWrite(12, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(12, LOW); // turn the LED off by making the voltage LOW
delay(1000);
} else {
Serial.println("Did not find fingerprint sensor :(");
while (1);
}
}
void loop() // run over and over again
{
Serial.println("Type in the ID # you want to save this finger as...");
uint8_t id = 0;
while (true) {
while (! Serial.available());
char c = Serial.read();
if (! isdigit(c)) break;
id *= 10;
id += c - '0';
}
Serial.print("Enrolling ID #");
Serial.println(id);
while (! getFingerprintEnroll(id) );
}
uint8_t getFingerprintEnroll(uint8_t id) {
uint8_t p = -1;
Serial.println("Waiting for valid finger to enroll");
while (p != FINGERPRINT_OK) {
p = finger.getImage();
switch (p) {
case FINGERPRINT_OK:
Serial.println("Image taken");
break;
case FINGERPRINT_NOFINGER:
Serial.println(".");
break;
case FINGERPRINT_PACKETRECIEVEERR:
Serial.println("Communication error");
break;
case FINGERPRINT_IMAGEFAIL:
Serial.println("Imaging error");
break;
default:
Serial.println("Unknown error");
break;
}
}
// OK success!
p = finger.image2Tz(1);
switch (p) {
case FINGERPRINT_OK:
Serial.println("Image converted");
break;
case FINGERPRINT_IMAGEMESS:
Serial.println("Image too messy");
return p;
case FINGERPRINT_PACKETRECIEVEERR:
Serial.println("Communication error");
return p;
case FINGERPRINT_FEATUREFAIL:
Serial.println("Could not find fingerprint features");
return p;
case FINGERPRINT_INVALIDIMAGE:
Serial.println("Could not find fingerprint features");
return p;
default:
Serial.println("Unknown error");
return p;
}
Serial.println("Remove finger");
delay(2000);
p = 0;
while (p != FINGERPRINT_NOFINGER) {
p = finger.getImage();
}
p = -1;
Serial.println("Place same finger again");
while (p != FINGERPRINT_OK) {
p = finger.getImage();
switch (p) {
case FINGERPRINT_OK:
Serial.println("Image taken");
break;
case FINGERPRINT_NOFINGER:
Serial.print(".");
break;
case FINGERPRINT_PACKETRECIEVEERR:
Serial.println("Communication error");
break;
case FINGERPRINT_IMAGEFAIL:
Serial.println("Imaging error");
break;
default:
Serial.println("Unknown error");
break;
}
}
// OK success!
p = finger.image2Tz(2);
switch (p) {
case FINGERPRINT_OK:
Serial.println("Image converted");
break;
case FINGERPRINT_IMAGEMESS:
Serial.println("Image too messy");
return p;
case FINGERPRINT_PACKETRECIEVEERR:
Serial.println("Communication error");
return p;
case FINGERPRINT_FEATUREFAIL:
Serial.println("Could not find fingerprint features");
return p;
case FINGERPRINT_INVALIDIMAGE:
Serial.println("Could not find fingerprint features");
return p;
default:
Serial.println("Unknown error");
return p;
}
// OK converted!
p = finger.createModel();
if (p == FINGERPRINT_OK) {
Serial.println("Prints matched!");
} else if (p == FINGERPRINT_PACKETRECIEVEERR) {
Serial.println("Communication error");
return p;
} else if (p == FINGERPRINT_ENROLLMISMATCH) {
Serial.println("Fingerprints did not match");
return p;
} else {
Serial.println("Unknown error");
return p;
}
p = finger.storeModel(id);
if (p == FINGERPRINT_OK) {
Serial.println("Stored!");
} else if (p == FINGERPRINT_PACKETRECIEVEERR) {
Serial.println("Communication error");
return p;
} else if (p == FINGERPRINT_BADLOCATION) {
Serial.println("Could not store in that location");
return p;
} else if (p == FINGERPRINT_FLASHERR) {
Serial.println("Error writing to flash");
return p;
} else {
Serial.println("Unknown error");
return p;
}
}
por supuesto que ocupe los mismos códigos ,pero agregue las instrucciones de los leds y servo....(que también los saque o copie de otra parte).
También cambie la instrucción para que no pida una id y grabe solo la huella....