sparkfun_qwiictwist
¶
CircuitPython library for the Sparkfun Qwiic Twist Rotary Encoder
Author(s): Gaston Williams
Implementation Notes¶
Hardware:
This is library is for the SparkFun Qwiic Twist Rotary Encoder.
SparkFun sells these at its website: www.sparkfun.com
Do you like this library? Help support SparkFun. Buy a board! https://www.sparkfun.com/products/15083
Software and Dependencies:
Adafruit CircuitPython firmware for the supported boards: https://github.com/adafruit/circuitpython/releases
Adafruit’s Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
- class sparkfun_qwiictwist.Sparkfun_QwiicTwist(i2c: busio.I2C, address: int = 63, debug: bool = False)¶
CircuitPython class for the Sparkfun QwiicTwist RGB Rotary Encoder
Initialize Qwiic Twist for i2c communication.
- change_address(new_address: int) bool ¶
Change the i2c address of Twist Rotary Encoder snd return True if successful.
- connect_color(red_value: int, green_value: int, blue_value: int) None ¶
Connect all the rgb color for the encoder LEDs
- property difference: int¶
Return the difference in number of clicks since previous check. The value is cleared after it is read.
- property int_timeout: int¶
Get number of milliseconds that elapse between the end of the knob turning and interrupt firing.
- set_color(red_value: int, green_value: int, blue_value: int) None ¶
Set the rgb color of the encoder LEDs
- property time_since_last_movement: int¶
Return the number of milliseconds since the last encoder movement