Releases: adafruit/Adafruit_CircuitPython_LIS3DH
Update examples
Merge pull request #32 from kattni/update-tap-example Update tap example to use interrupt. See comments.
Added named tuple support for acceleration.
Thanks to @Sigafoos for the great work!
To use in CircuitPython, simply install the Adafruit CircuitPython bundle or the zip from this release that matches the version of CircuitPython you are using.
Improved reference documentation.
Thanks to @sommersoft for the great work!
Sphinx update.
Thanks to @brentru for the great work!
Tap detection now using interrupts!
Change in keyword arguments: you MUST specify address
and baudrate
as keyword arguments if changing the defaults when creating the I2C and SPI objects.
You can now specify an interrupt pin when using tapped
. Functions without interrupt specified but will return true multiple times for each tap event.
Fix tap detection to make single/double detection work properly.
Merge pull request #18 from kattni/threshold-config-update update to threshold config
Click -> Tap
Rework tap detection so that its clear only single or double taps can be detected at a time. Prior to this change it would detect the individual taps that are part of a double tap.
So, tapped
is now True
if the type of tap specified in set_tap
was detected recently.
This is an API change! To update your code:
- Replace
read_click
withtapped
and change it for a single value. - Rename
set_click
toset_tap
. Most uses ofclick
in names were replaced withtap
to better align with actual use. It remains only in places that match a register of a similar name. - Replace
read_click_raw
withlis3dh._read_register_byte(adafruit_lis3dh.REG_CLICKSRC)
its no longer exposed directly because it requires knowledge of the register bits.
To use in CircuitPython, download the zip file that matches your version of CircuitPython, unzip it, and copy adafruit_lis3dh
to the lib
folder on the CIRCUITPY
drive. Or, simply install the Adafruit CircuitPython bundle.
Updated with lint and autobundling!
Thanks to @tannewt for the great work!
Now with shake detection!
- Added support for
lis3dh.shake
To use in CircuitPython, download adafruit_lis3dh.zip
, unzip it, and copy adafruit_lis3dh
to the lib
folder on the CIRCUITPY
drive. Or, simply install the Adafruit CircuitPython bundle.
use import struct and I2CDevice.readinto
- now uses import struct instead of ustruct
- Optimize the way data in unpacked using struct.unpack
- Changes made to follow changes in Adafruit_Circuitpyton_BusDevice.I2CDevice