Skip to content

Commit

Permalink
manually add #79
Browse files Browse the repository at this point in the history
  • Loading branch information
ladyada committed Jul 8, 2020
1 parent ead18cb commit 466294f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
19 changes: 18 additions & 1 deletion Adafruit_Fingerprint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,9 +300,26 @@ uint8_t Adafruit_Fingerprint::fingerFastSearch(void) {
return packet.data[0];
}


/**************************************************************************/
/*!
@brief Control the built in LED
@param on True if you want LED on, False to turn LED off
@returns <code>FINGERPRINT_OK</code> on success
*/
/**************************************************************************/
uint8_t Adafruit_Fingerprint::LEDcontrol(bool on) {
if (on) {
SEND_CMD_PACKET(FINGERPRINT_LEDON);
} else {
SEND_CMD_PACKET(FINGERPRINT_LEDOFF);
}
}


/**************************************************************************/
/*!
@brief Control the built in LED (if exists). Check datasheet/manual
@brief Control the built in Aura LED (if exists). Check datasheet/manual
for different colors and control codes available
@param control The control code (e.g. breathing, full on)
@param speed How fast to go through the breathing/blinking cycles
Expand Down
3 changes: 3 additions & 0 deletions Adafruit_Fingerprint.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@
//!< last model generated
#define FINGERPRINT_TEMPLATECOUNT 0x1D //!< Read finger template numbers
#define FINGERPRINT_AURALEDCONFIG 0x35 //!< Aura LED control
#define FINGERPRINT_LEDON 0x50 //!< Turn on the onboard LED
#define FINGERPRINT_LEDOFF 0x51 //!< Turn off the onboard LED

#define FINGERPRINT_LED_BREATHING 0x01 //!< Breathing light
#define FINGERPRINT_LED_FLASHING 0x02 //!< Flashing light
Expand Down Expand Up @@ -149,6 +151,7 @@ class Adafruit_Fingerprint {
uint8_t fingerSearch(uint8_t slot = 1);
uint8_t getTemplateCount(void);
uint8_t setPassword(uint32_t password);
uint8_t LEDcontrol(bool on);
uint8_t LEDcontrol(uint8_t control, uint8_t speed, uint8_t coloridx,
uint8_t count = 0);

Expand Down

0 comments on commit 466294f

Please sign in to comment.