Closed
Description
I'm trying to read the distance using the VL6180X sensor on my Raspberry Pi.
Everything worked fine, but then I installed again the library and I'm getting the following error:
Traceback (most recent call last):
File "distance.py", line 11, in <module>
sensor = adafruit_vl6180x.VL6180X(i2c)
File "/usr/local/lib/python3.7/dist-packages/adafruit_vl6180x.py", line 109, in __init__
if self._read_8(_VL6180X_REG_IDENTIFICATION_MODEL_ID) != 0xB4:
File "/usr/local/lib/python3.7/dist-packages/adafruit_vl6180x.py", line 284, in _read_8
i2c.write_then_readinto(bytes([(address >> 8) & 0xFF, address & 0xFF]), result)
File "/usr/local/lib/python3.7/dist-packages/adafruit_bus_device/i2c_device.py", line 150, in write_then_readinto
in_start=in_start, in_end=in_end)
File "/usr/local/lib/python3.7/dist-packages/busio.py", line 70, in writeto_then_readfrom
in_start=in_start, in_end=in_end, stop=stop)
File "/usr/local/lib/python3.7/dist-packages/adafruit_blinka/microcontroller/generic_linux/i2c.py", line 62, in writeto_then_readfrom
raise NotImplementedError("Currently can only write a single byte in writeto_then_readfrom")
NotImplementedError: Currently can only write a single byte in writeto_then_readfrom
After further inspection, it seems that the culprit is the commit 74a7a7f . If I revert it everything works fine.
I can't grasp the whole picture since it's way over my head, but those changes are definitively related to the issue.
Metadata
Metadata
Assignees
Labels
No labels