EasyManua.ls Logo

sparkfun Qwiic Twist - Software and Advanced Topics; Qwiic Twist Arduino Library

sparkfun Qwiic Twist
12 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
The INT pin on Qwiic Twist is open drain, meaning the pin will actively go low when an interrupt occurs but will
then float when there is no interrupt. This open drain type of setup is handy if you have multiple devices sharing a
single interrupt line. For advanced applications (such as many many Twists all sharing the same INT pin) you may
want to cut this jumper on each Twist to remove the 10k pull ups. For general use you can leave this jumper
unmodified.
The Qwiic Twist has built-in 2.2k pull-up resistors on the SDA and SCL lines. These are needed for normal I C
communication. The I C jumper has two small traces connecting the pull-ups to 3.3V. For general use you can
leave this jumper unmodified. If you have many (over 7) devices on the I C bus, each with their own pull up
resistors, then you may want to cut the I C jumpers to disconnect the 2.2k resistors on each Qwiic board.
Qwiic Twist Arduino Library
Note: This example assumes you are using the latest version of the Arduino IDE on your desktop. If this is
your first time using Arduino, please review our tutorial on installing the Arduino IDE. If you have not
previously installed an Arduino library, please check out our installation guide.
We’ve written an easy to use Arduino library that covers the gamut of features on the Qwiic Twist. The easiest way
to install the library is by searching SparkFun Twist within the Arduino library manager. We’ve even got a tutorial
on installing an Arduino library if you need it. You can also manually install the Qwiic Twist library by downloading a
zip:
DOWNLOAD THE SPARKFUN QWIIC TWIST LIBRARY (ZIP)
Example 1 - Basic reading of the encoder value
Example 2 - Set the Knob Color
Example 3 - Displaying Crazy Colors on Knob
Example 4 - Connect Colors: Change knob color from blue to red based on position
Example 5 - Reading Time Stamps
Example 6 - Display encoder difference since last reading
Example 7 - Set the encoder count value
Example 8 - Enabling and reading interrupts
Example 7 - Set the encoder count value
Example 9 - Change the I C address
Example 10 - Advanced Wire settings
2
2
2
2
2