Replies: 10 comments 5 replies
|
Thank you. Snippet:OutputWhen I wrote the debounce step from 10 to 2, reading it back does give me 2, so I'm unsure how one works but not the other. |
|
Hello @voloved , |
|
Hello @cparata , My board now has the LIS2DUX chip. I am getting correct WHO_IS, steps, accelerometer readings, etc with the LIS2DUX library, so I know it is installed correctly. Would you be able to revisit my questions with knowing that the LIS2DUX is the part that I am using? My apologies if I provided confusion on that. |
|
Hi @voloved , |
|
Thanks for the advice! Tap ControlI did notice the ODR needed to by high-power 400 and disabled running the step counter during my original testing. I read back the ODR and confirmed it was set to 400. Here are my parameters: Step CounterI changed the debounce to 1 step from 10 yesterday after rereading the datasheet's explanation of the debounce. I did not read see the application notes and I'll start reading through them. else if (movement_state.has_lis2dux) {
LIS2DUXS12Sensor_Enable_X(&ctx);
LIS2DUXS12Sensor_Enable_Pedometer(&ctx, LIS2DUXS12_INT1_PIN);
+ lis2duxs12_stpcnt_debounce_set(&ctx, 1);
movement_state.counting_steps = true;
return true;It's set after Also, would you happen to know if there are any known issues with setting |
|
Hello @voloved , Obviously, you need to adapt I2C instance and interrupt pin on your side, but in my case the sketch works as expected. |
|
Hi @voloved , |
|
Hello @voloved , |
|
Discussion moved to ST Community: https://community.st.com/t5/others-hardware-and-software/lis2dux-step-counter-maximize-battery/m-p/856258#M32934 |
Uh oh!
There was an error while loading. Please reload this page.
Hello,
I am working on adding a pedometer to the Sensorwatch project using this chip.
I added the logic found in this codebase to my repository and it's working fairly-well execpt for 2 issues:
Tap detection isn't working
The project currently has an LIS2DW chip, which allows for tap control. I'm trying to remake that logic with the LIS2DUX.
Here is the logic I used to set up tap control.
It's based off this section of the repo.
I was able to confirm that X,Y, and Z readings are updating correctly, and the interrupt does trigger on six_d events when I enable it, which leads me to believe that it must be the tap control parameters that I am setting up incorrectly.
Are there parameters that are recommended to prove that tap detection works?
Are there any other suggestions on why I don't see tap events?
The step counter is extremely insensitive and after about an hour, I stop seeing the step counter update at all.
The main reason I want the LIS2DUX is for the step counting feature. I ported the stm32duino code, and it works, but not well. It under-counts steps and I often see that I run for 100+ steps with nothing being read.
I often find that if I keep the pedometer running for a while, it just stops, and the only way to get it working again is to reset/cycle power to my board, as if the LIS2DUX just stops communicating after enough time passes.
I see in the datasheet that there is debounce and time delta settings that I can change, which may be able to help with the undercounting, but I don't know if it'll also address the chip just stopping communication over time. Since the base library doesn't mess with those settings, I'm hesitant on rabbit-holing too far without some guidance.
Are there parameters that are recommended to stop the LIS2DUX from stopping communication? Is that even what I'm seeing?
How do I make the step counter more sensative so it doesn't miss 100+ steps while running?
Are there any other suggestions on why I don't see tap events?
Enabling of the step counter in my code
The step Counter enable function itself
Based off this code from ST
All reactions