Hi,
I’m having difficulty reading the reTerminal LIS3DHTR accelerometer readings in python. I’m using smbus2. I’m getting a python error message: OSError: [Errno 16] Device or resource busy
From searching, it seems likely that another driver is loaded and needs to be removed using the rmmod
command, but IDK how to determine what driver that might be. Does this sound right? Do I need to unload a driver to read the accelerometer data in python?
I also want to make sure the accelerometer is located on the I2C bus I’m assuming it is as I try to read it. After running the evtest
command and selecting the accelerometer it shows:
Input device ID: bus 0x19 ...
So I’m assuming 0x19 is the bus address. When I run the i2cdetect
command I see a device at 0x19 address on buses 1, 20, and 21. I’m assuming it’s on bus 1 (the default user bus I believe) which shows UU
at address 0x19. Please let me know if bus 1 is not the correct bus to which the accelerometer is connected.
Also, if there’s a better/easier way to read the accelerometer data I’m all ears. I tried using the adafruit_lis3dh library but it was a no go. Said no device at address 0x19. Not sure what bus it’s looking on or how to set it up any better using that library
I should probably mention I am installing into virtual environments, so smbus2 is not installed globally. Not sure if that would matter with i/o reading.