Skip to content

Add set_led() to control LED or R503 Sensor

Compare
Choose a tag to compare
@jerryneedell jerryneedell released this 24 Oct 18:16
3e34bf6

Adds a function set_led() to the library to control the built-in LED for the r503 sensor.

def set_led(self, color=1, mode=3, speed=0x80, cycles=0):
        """LED function -- only for R503 Sensor.
        Parameters: See User Manual for full details
        color: 1=red, 2=blue, 3=purple
        mode: 1-breathe, 2-flash, 3-on, 4-off, 5-fade_on, 6-fade-off
        speed: animation speed 0-255
        cycles: numbe of time to repeat 0=infinite or 1-255
        Returns the packet error code or success"""

Added examples for r503 that demonstrate some led functions.

Details regarding the LED control are in the Users Manual
https://cdn-shop.adafruit.com/product-files/4651/4651_R503+fingerprint+module+user+manual.pdf