hi! engineers from Openmv. I just bought a openmv and meet a problem when I connect it to a mlx90640 sensor. I download your new released IDE and when I tried to run the program it tells me it cannot read the data. Can you help me?

By the way, openmv is really a good product. Thanks for your work!

That would be an I2C error. Um, did the init method succeed?

The error is caused by this code:

Um, also, keep in mind the FPS on the MLX sensor. So, you cannot run it at a very high sample rate in hz. The default sample rate we supply is about the max that you can hit. If you go lower with it that also might be better. If the I2C connection is good then what’s happening is that the MLX sensor is running too fast and is overwriting it’s internal frame buffer before we have a chance to read it out over I2C. The MLX API driver throws an error when this happens and that’s what you are seeing. Slowing down the sensor refresh rate will fix the issue. Given the resolution of the MLX sensor it’s not actually possible to pull the image at the max refresh rate they support over I2C easily without going above 400 KHz which then starts to cause issues related to wire length.

I can speed the I2C bus up however if you think it might be needed… would need to change our driver for it though to support multiple freqs.

Thank you very much for your detailed reply. I change the refresh rate from 16 to 4, to 1 or any smaller value, but the problem still exists.
The heat map doesn’t always show, sometimes it just show nothing and return an error.

Can you give me some more information? It works for me with my MLX 90640 sensor from SparkFun. I notice you are using a different sensor. Do you see any other behavior? Some I can know what went wrong? That error is generated only via with the I2C bus not getting an ACK on reading or the sensor generating data too fast and not being read fast enough by the M7 camera.

I spend a whole day trying to find out what’s wrong and finally find that I should change the baud rate and refresh rate to make it consistent with your library. Also, I connect PS to GND and it works!

Again, I want to thank you for your help!

I am using the breakout board from sparkfun and I am getting the same error ‘fail to init’ on the MLX overlay demo. Can you tell me more details about your solution?

Rwan, would you mind posting which pins you used to connect? You just say it doesn’t work and then provide no details.

I connected it to the same pins that I connect the grideye (AMG8833) to: P4, P5, GND and 3.3V. The grideye works but the MLX doesn’t. I am opening a github issue as recommended by @iabdalkader.