2017-05-09 02:40 AM
Hey guys, I am trying to do click detection for my LIS3DH accelerometer. For single click, what I should add inside my code? Here is my code, please help me.
void Acc__EnableClickDetect(void)
{ LIS3DH_SetAxis(LIS3DH_X_ENABLE); LIS3DH_SetODR(LIS3DH_ODR_400Hz); LIS3DH_SetClickCFG(LIS3DH_ZD_DISABLE | LIS3DH_ZS_DISABLE | LIS3DH_YD_DISABLE | LIS3DH_YS_DISABLE | LIS3DH_XD_DISABLE |LIS3DH_XS_ENABLE); }Do I need to add Latency, Limit and Window inside the code? I tried to add it but when I call LIS3DH_SetClickLatency(200) inside the function, there was a warning Implicit declaration something like that.
2017-05-10 06:37 AM
Please read the chapter 7 'Click and double-click recognition' in the application note
http://www.st.com/resource/en/application_note/cd00290365.pdf
.2017-05-10 07:20 PM
Thanks!!! I will.
2017-05-10 11:07 PM
Sorry, how to check if my click is detected ?