Closed dglaude closed 4 years ago
ok btw, the MLX will not work with FT232H...the FT232H doesnt buffer I2C write/reads so its very slow and the MLX requires you read the data within one frame
Thank you @ladyada Let met guess... Adafruit MCP2221A Breakout is no better?
From my point of view, this can be closed. But there might be a problem with writeto_then_readfrom in Blinka and this will be triggered by other driver for other hardware. So someone may want to double check this.
PS: For the MLX, I switched to PyGamer where demo code works as expected, no trying to displayio it.
@dglaude Can you check what version of pyftdi you are using? The Blinka FT232H support was developed on a version prior to 0.40.0, which looks like it made some API breaking changes: https://eblot.github.io/pyftdi/index.html#major-changes
@caternuson I must have been above: Requirement already satisfied: pyftdi in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (0.42.2)
From my point of view this issue can be closed since MLX90640 will not work (or not well) with FT232H.
If someone has similar issue with I2C communication with Blinka on OSX, this can be reopen, or a more specific one be open...
Thanks. I'm pretty sure that's the issue - pyftdi made an API breaking change at 0.40.0. The reads are now returning bytes and no longer need the tobytes()
conversion. I'm going to re-open since this is a generic issue for I2C on the FT232H.
@ladyada Want to just update requirements.txt to limit it to an older pyftdi version that works? Or update Blinka to match pyftdi's latest API?
update plz!
The basic pyftdi API issue should be fixed in release version 3.3.9.
This does not fix MLX90640 use with FT232H. See above for info on that limitation.
While trying to use an MLX90640 I2C thermal camera, connected to a FT232H, connected to a Mac mini, I got the following error:
AttributeError: 'bytearray' object has no attribute 'tobytes'
The full error logs is at the end.
The test code I use is taken from here: https://pypi.org/project/adafruit-circuitpython-mlx90640/
I believe the problem is in src/adafruit_blinka/microcontroller/ft232h/i2c.py on line 33
But I have no clue what is the origin of the problem, nor if it is related to my specific setup...
I am sorry for the poor quality of this report. I hope this can be reproduce and help solve a bug.