Step counter with LIS2DS12
Hi, I'm using LIS2DS12 and I was wondering if it was possible to use it as a pedometer? How do you suggest to set the thresholds?
Thanks
Hi, I'm using LIS2DS12 and I was wondering if it was possible to use it as a pedometer? How do you suggest to set the thresholds?
Thanks
hi john, please follow these instructions:
Read current value of 21h (CTRL2_INIT) and store it
Write reg 21h = CTRL2_INIT|10h // This will enable access the embedded functions registers: write bit#4 of reg 21h to 1,keep the other bits unchanged
Set delta time in reg3Ah // 1 LSB = 1.6384 s
Write reg 3Fh = CTRL2_INIT // Disable access the embedded functions registers: write bit #4 of reg3Fh to 0, keep the other bits unchanged
Please remember to implement also a debounce functionality in order to avoid false step detection (e.g. 7 consecutive steps have to be detected before the first interrupt generation)
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.