Closed VarunKumaran closed 1 year ago
Yes, it's possible. Ideally you could set up an automation on Home Assistant to trigger on match but if you want to execute it within the microcontroller. Assuming relay signal is connected on pin 7 of an esp32:
void setup()
{
// ... //
pinMode(7,OUTPUT);
digitalWrite(7,HIGH);
// ... //
}
uint8_t getFingerprintID() {
// ... //
if (p == FINGERPRINT_OK) {
Serial.println("Match!");
lastID = finger.fingerID;
lastConfidenceScore = finger.confidence;
digitalWrite(7,LOW);
delay(500);
digitalWrite(7,HIGH);
return p;
}
// ... //
}
Referenced in #20 Addition of a GPIO pin for relay modulation.
Hiii @unseemlycoder I worked around the problem and got a solution a year back itself and I was a noob back then 😅.. anyway thanks for reminding me to close the issue
Is there a way to trigger a small 5V relay when the fingerprint is matched with the stored prints ??