M
@gertjanvanhethof odd, I had to change a few things:
import for LIS2HH12 was in lower but file is upper
"acc = LIS2HH12()" - was getting an error that it didn't want any parameter so I emptied that and it's working now
I didn't need to change the pins. This is with WiPy 2.0.
Odd, looking thru the documentation, the pins for I2C don't match between the pysense and any of the boards. Anyway, it's working for me on 9 and 10. - EDIT - Wondering if it's taken care of in the library now instead. I just commented out the line and it still works.
Edit again - yes, looking in the libraries, it's actually set there which makes more sense anyway.
Below is working fine:
from machine import I2C
from LIS2HH12 import LIS2HH12
import time
acc = LIS2HH12()
while True:
print('----------------------------------')
print('X, Y, Z:', acc.read())
print('Roll:', acc.roll())
print('Pitch:', acc.pitch())
print('Yaw:', acc.yaw())
time.sleep(1)