Closed jakobfriis closed 4 years ago
I need a hint on how to set the range and rate, using this library.
import adafruit_adxl34x
i2c = busio.I2C(board.SCL, board.SDA) accelerometer = adafruit_adxl34x.ADXL345(i2c)
Using acceleromter.range(Range.RANGE_16_G) with yields the following error TypeError: 'int' object is not callable
Im probably using it wrong, but i cannot find any examples setting the range and data rate.
@jakobfriis try like this:
acceleromter.range = Range.RANGE_16_G
range is a property with a setter rather than being a function.
Facepalming myself. Thanks for the help 👍👍
I need a hint on how to set the range and rate, using this library.
import adafruit_adxl34x
i2c = busio.I2C(board.SCL, board.SDA) accelerometer = adafruit_adxl34x.ADXL345(i2c)
Using acceleromter.range(Range.RANGE_16_G) with yields the following error TypeError: 'int' object is not callable
Im probably using it wrong, but i cannot find any examples setting the range and data rate.