Skip to content

AttributeError: 'LSM6DS33' object has no attribute 'pedometer_steps' #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dglaude opened this issue Jul 30, 2020 · 3 comments · Fixed by #20
Closed

AttributeError: 'LSM6DS33' object has no attribute 'pedometer_steps' #21

dglaude opened this issue Jul 30, 2020 · 3 comments · Fixed by #20
Labels
bug Something isn't working

Comments

@dglaude
Copy link

dglaude commented Jul 30, 2020

Both the example lsm6ds_pedometer.py and the learn guide https://learn.adafruit.com/clue-step-counter-st-lsm6ds33/overview do fail on trying to get pedometer_steps.

@caternuson
Copy link

Hmm. Yah, it's not there:

Adafruit CircuitPython 5.3.1 on 2020-07-13; Adafruit CLUE nRF52840 Express with nRF52840
>>> import board
>>> import adafruit_lsm6ds
>>> adafruit_lsm6ds.__version__
'4.0.1'
>>> sensor = adafruit_lsm6ds.LSM6DS33(board.I2C())
>>> dir(sensor)
['__class__', '__dict__', '__init__', '__module__', '__qualname__', 'reset', 'i2c_device', '_chip_id', '_raw_accel_data', '_raw_gyro_data', '_accel_range', '_accel_data_rate', '_gyro_data_rate', '_gyro_range', '_gyro_range_125dps', '_gyro_range_4000dps', '_sw_reset', '_bdu', '_high_pass_filter', '_i3c_disable', '_pedometer_reset', '_func_enable', '_ped_enable', 'CHIP_ID', 'acceleration', 'gyro', '_scale_xl_data', '_scale_gyro_data', 'accelerometer_range', 'gyro_range', 'accelerometer_data_rate', 'gyro_data_rate', 'pedometer_enable', 'high_pass_filter', '_cached_accel_range', '_cached_gyro_range']
>>> 'pedometer_enable' in dir(sensor)
True
>>> 'pedometer_steps' in dir(sensor)
False
>>>  

@caternuson
Copy link

Looks like it got removed in this PR:
#16
Most likely a mistake. The other pedometer related registers were refactored. That one got removed.

@evaherrada evaherrada added the bug Something isn't working label Aug 6, 2020
@evaherrada
Copy link
Collaborator

Fixed by #20

@evaherrada evaherrada linked a pull request Aug 6, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants