CircuitPython library for the Sparkfun Qwiic Twist Rotary Encoder
- Author(s): Gaston Williams
- This is library is for the SparkFun Qwiic Joystick.
- 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
Sparkfun_QwiicTwist(i2c, address=63, debug=False)¶
CircuitPython class for the Sparkfun QwiicTwist RGB Rotary Encoder
Get the value of the blue LED
Get the value of the blue LED connection.
Change the i2c address of Twist Rotary Encoder snd return True if successful.
Clears the moved, clicked, and pressed bits
Return true if a click event has occurred. Event flag is then reset.
connect_color(red_value, green_value, blue_value)¶
Connect all the rgb color for the encoder LEDs
Check the id of Rotary Encoder. Returns True if successful.
Returns the number of indents since the user turned the knob.
Return the difference in number of clicks since previous check. The value is cleared after it is read.
Get the value of the green LED.
Get the value of the green LED connection.
Get number of milliseconds that elapse between the end of the knob turning and interrupt firing.
Return true if the knob has been twisted.
“Return true if button is currently pressed.
Get the value of the red LED.
Get the value of the red LED connection
set_color(red_value, green_value, blue_value)¶
Set the rgb color of the encoder LEDs
Return the number of milliseconds since the last encoder movement
Return the number of milliseconds since the last button press and release
Return the version string for the Twist firmware.