Open
Description
Is this code still working?
I'm new to the whole esp8266 thing. I got a mpu6050 plugged to a wemos d1 mini. From the cabling side, everything looks right: wemos d1 mini turned on, mpu6050 turned on (inferring this from the led being turned on).
When trying to create an instance of the accelorometer class you implemented I get the following error:
>>> mpu6050.accel(i2c)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "mpu6050.py", line 6, in __init__
OSError: [Errno 19] ENODEV
I'm not sure I understand how your code works (with the memory addresses and all)
def __init__(self, i2c, addr=0x68):
self.iic = i2c
self.addr = addr
self.iic.start()
self.iic.writeto(self.addr, bytearray([107, 0]))
self.iic.stop()
The self.iic.writeto(self.addr, bytearray([107, 0]))
instruction fails but I don't know why exactly.
Do you mind sharing some insights? :) Thanks!
Metadata
Metadata
Assignees
Labels
No labels