EverythingSmartHome / fingerprint-mqtt

Fingerprint sensor with MQTT support based on Adafruit Fingerprint Sensor Library
GNU General Public License v3.0
24 stars 14 forks source link

Added LED on/off sketch #1

Closed adamburgoyne closed 4 years ago

adamburgoyne commented 4 years ago

Created a new sketch that adds an extra mqtt topic that can be used to enable/disable the LED in the reader (obviously needs to be on to work though). It requires manual changes to some libraries so that's why it's an extra sketch but I've added the instructions to a sub README.

There's not really many changes in the main script. A new topic at the top, a subscribe to that topic, new callback method for the topic and the bypass in the main loop method.

Let me know if there's a better way you'd like this formatted. I didn't want to actually include the modified library files as I think it's probably better whoever uses this just applies the changes to the latest library at the time as it'll be impossible to keep up to date.

EverythingSmartHome commented 4 years ago

Hey Adam,

That looks good. One thing I would perhaps do is if you want to put the actual modifications you need to make to the library into a readme within the sketch folder? Then we can keep the main readme tidy and just link to it from there. What do you think?

You might want to consider submitting the LED changes to the main Adafruit library as a PR, good job! :)

adamburgoyne commented 4 years ago

Sorry but I'm not sure what you mean about the README? The one in this PR is a new README within the sketch folder. The root level one I've left untouched, or did you mean another subfolder within the fingerprint folder with it in?

EverythingSmartHome commented 4 years ago

Ah sorry, I meant to do what you already have, the way it displayed to me wasn't clear at the time but I see that now! :)