New Plugin for LIS3DH Accelerometer
Posted: 09 Nov 2017, 03:04
For anyone interested, I implemented a plugin for the LIS3DH accelerometer. You can buy one for a few bucks on ebay. More information about a breakout board here:
https://learn.adafruit.com/adafruit-lis ... g-and-test
You can pick up the files from my github here:
https://github.com/kociubin/ESPEasy
You need to pick up the following files from the repo:
Adafruit_LIS3DH.cpp
Adafruit_LIS3DH.h
Adafruit_Sensor.h
_P188_LIS3DH.ino
It will build as a "dev" plugin. Usage should be self explanatory. I currently have it hooked up to trigger on a single or double click/tap. Many of the click parameters (like threshold, latency, time window, etc) are configurable. More information on those are at the link above.
I'm currently using it inside a light switch. You tap the plastic wall plate to turn lights on/off. It seems to work better than touch or gesture sensors I also tried for this purpose.
https://learn.adafruit.com/adafruit-lis ... g-and-test
You can pick up the files from my github here:
https://github.com/kociubin/ESPEasy
You need to pick up the following files from the repo:
Adafruit_LIS3DH.cpp
Adafruit_LIS3DH.h
Adafruit_Sensor.h
_P188_LIS3DH.ino
It will build as a "dev" plugin. Usage should be self explanatory. I currently have it hooked up to trigger on a single or double click/tap. Many of the click parameters (like threshold, latency, time window, etc) are configurable. More information on those are at the link above.
I'm currently using it inside a light switch. You tap the plastic wall plate to turn lights on/off. It seems to work better than touch or gesture sensors I also tried for this purpose.