Skip to content

Setting accel_range and gyro_scale #32

@nmaas87

Description

@nmaas87

Dear all,
I just got two short questions regarding accel_range and gyro_scale.
a) Is it correct to set the values like that initially, or do I need to reset the sensor afterwards in some fashion?

import board
import busio
import adafruit_lsm9ds1
lsm9ds1 = adafruit_lsm9ds1.LSM9DS1_I2C(i2c)
lsm9ds1.accel_range = adafruit_lsm9ds1.ACCELRANGE_16G
lsm9ds1.gyro_scale = adafruit_lsm9ds1.GYROSCALE_2000DPS

b) Can I, at any time, set the range/scale to a new value like this, or do I need to reset/give another command to the sensor?

lsm9ds1.accel_range = adafruit_lsm9ds1.ACCELRANGE_2G
lsm9ds1.gyro_scale = adafruit_lsm9ds1.GYROSCALE_245DPS

Thanks a lot for your help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions