Thermal Sensor MLX90640: Python example not working

Hi there,

my MLX90640 is working in the sense that BasicReadings.py gives me the expected rows of pure data.
Anyway, the Python example seeed_python_ircamera.py (executed via ircamera ISC MLX90640) starts a blank window, but is terminating soon. Here’s the error code:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/seeed_python_ircamera.py", line 99, in run
    self.readData()
  File "/usr/local/lib/python3.9/dist-packages/seeed_python_ircamera.py", line 87, in i2cRead
    self.dataHandle.getFrame(hetData)
  File "/usr/local/lib/python3.9/dist-packages/seeed_mlx9064x.py", line 125, in getFrame
    status = self._GetFrameData(mlx90640Frame)
  File "/usr/local/lib/python3.9/dist-packages/seeed_mlx9064x.py", line 154, in _GetFrameData
    raise RuntimeError("Too many retries")
RuntimeError: Too many retries
Aborted

Any hints?
Thanks in advance!


Hi, my English is not very good, please forgive me, do you run in python?
In my tests there were no similar issues with the use of arduino on wiki.

Hi @Seeed_Jostar ,
thanks a lot for your fast reply.
I’m running in python on a Raspberry Pi.
I discoverd by accident a solution: Changing RefreshRate from 8 Hz to 4 Hz did the trick.
I’m assuming that’s because I’m running a pretty old hardware: A Raspberry Pi 2 from 2014 - good old days. :slight_smile:

Here is what I did:
Editing
/usr/local/lib/python3.7/dist-packages/seeed_python_ircamera.py
and changing
seeed_mlx90640.RefreshRate.REFRESH_8_HZ
into
seeed_mlx90640.RefreshRate.REFRESH_4_HZ

Thanks again and good bye!