Skip to content

lsm6dsox: Add pedometer support#1091

Merged
dpgeorge merged 2 commits intomicropython:masterfrom
sebromero:pedometer
Mar 19, 2026
Merged

lsm6dsox: Add pedometer support#1091
dpgeorge merged 2 commits intomicropython:masterfrom
sebromero:pedometer

Conversation

@sebromero
Copy link
Contributor

This pull request adds basic support for the LSM6DSOX IMU's built-in pedometer feature in the MicroPython driver, including new register definitions, helper methods, and a usage example. The main changes enable step counting, step detection interrupts, and configuration of debounce steps.

@sebromero sebromero force-pushed the pedometer branch 2 times, most recently from 745fb9f to 3409442 Compare March 4, 2026 23:36
@sebromero sebromero force-pushed the pedometer branch 3 times, most recently from d5d8af9 to a48a9b6 Compare March 16, 2026 12:03
Copy link
Contributor

@iabdalkader iabdalkader left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@dpgeorge dpgeorge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a good addition, thanks!

Just a few comments which should help make the code a bit smaller.

@sebromero sebromero requested a review from dpgeorge March 18, 2026 14:43
@sebromero
Copy link
Contributor Author

Thank you @dpgeorge for the review! I implemented the suggestions which indeed reduced code size. I applied _modify_bits also in two other places. I re-tested the pedometer and the MLC examples ✅

Copy link
Member

@dpgeorge dpgeorge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating, looks good now.

This commit adds basic support for the LSM6DSOX IMU's built-in pedometer
feature in the MicroPython driver, including new register definitions,
and helper methods.  The main changes enable step counting, step detection
interrupts, and configuration of debounce steps.

Signed-off-by: Sebastian Romero <s.romero@arduino.cc>
Signed-off-by: Sebastian Romero <s.romero@arduino.cc>
@dpgeorge dpgeorge merged commit 017f862 into micropython:master Mar 19, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants