Skip to content

Click -> Tap

Compare
Choose a tag to compare
@tannewt tannewt released this 15 Dec 18:09
02e57df

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 with tapped and change it for a single value.
  • Rename set_click to set_tap. Most uses of click in names were replaced with tap to better align with actual use. It remains only in places that match a register of a similar name.
  • Replace read_click_raw with lis3dh._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.