click-detector

wayland/lis3dh-accelerometer-spi/click-detector

Combines low level nodes to create a simple to use click-detector. Detects single or double taps of the sensor.
click-detector
@/click-detector
Combines low level nodes to create a simple to use click-detector. Detects single or double taps of the sensor.
CSport
Chip Select
ENboolean
Enable the click-detector.
RATEbyte
Data rate. Options: 01h = 1 Hz, 02h = 10 Hz, 03h = 25 Hz, 04h = 50 Hz, 05h= 100 Hz, 06h = 200 Hz, 07h = 400 Hz (default), 00h = powered down, 08h = 1.6 kHz (low power), 09h = 5 kHz (low power).
RANGEbyte
Range. Options: 00h = +/- 2g (default), 01h = +/- 4g, 02h = +/- 8g, 03h = +/- 16g.
THRESHOLDbyte
Adjust this number for the sensitivity of the 'click' force. This strongly depends on the range! For 16G, try 5-10; for 8G, try 10-20; for 4G, try 20-40; for 2G, try 40-80.
T-LIMITbyte
Time limit (default = 10). To convert to seconds divide by data rate. For example, if the data rate is 400Hz, then the default value of 10 is equivalent to a time limit of 25 ms.
T-LATENCYbyte
Time latency (default = 20). To convert to seconds divide by data rate. For example, if the data rate is 400Hz, then the default value of 20 is equivalent to a latency of 50 ms.
T-WINDOWbyte
Time window (default = 255). To convert to seconds divide by data rate. For example, if the data rate is 400Hz, then the default value of 255 is equivalent to a time window of 637.5 ms.
click-detector
CS
EN
RATE
RANGE
THRESHOLD
T-LIMIT
T-LATENCY
T-WINDOW
SNG
DBL
DONE
DONEpulse
Pulse after checking for click (tap).
DBLpulse
Pulse if double "click" (tap) detected.
SNGpulse
Pulse if single "click" (tap) detected.
To use the node in your project you should have the wayland/lis3dh-accelerometer-spi library installed. Use the “File → Add Library” menu item in XOD IDE if you don’t have it yet. See Using libraries for more info.