Mlx90640

Is the python code available for mlx90640 available on pypi and github repository proper and does it work for any raspberry pi device please Help I am beginner and I am working on project based on it

Hi,



What the error you are getting? can you please share more details? Thanks.

It is obvious the raspberry pi example given in the Seeed Studio wiki is unfinished. If you save the lines from the wiki into: ThermalCamera_MLX90640V01.py and execute: sudo python ThermalCamera_MLX90640V01.py you get the run time error:
File “ThermalCamera_MLX90640V01.py”, line 17

         ^

IndentationError: expected an indented block

If you go the the Adafruit example you can see that the Seeed version is based on it and there is much more code.

The list for ThermalCamera_MLX90640V01.py is:


Seeed please correct the python example so that it can execute.

@dsrc34 Thanks for reminding me. I’ll fix it as soon as possible

1 Like

Hi there;
there exists an example code for this product at this github.

There is also a full working example at: MLX90640 IR Thermal Camera Working With Raspberry Pi 4

I installed the extra code and it works.

@prathapsagar0306 try these and let us know the feedback.

1 Like

This error message occurs when the Python interpreter encounters a code block that should be indented, but isn’t. Python indentation is a common issue in Python because whitespace is used to define code blocks, so proper indentation is critical for code to run correctly. Some common causes of this error include:

  • Forgetting to indent the statements within a compound statement
  • Forgetting to indent the statements of a user-defined function.

To fix the error, make sure that all lines in the code block are properly indented by the same number of spaces or tabs. . It is recommended to use 4 spaces for indentation in Python, tabulation or a different number of spaces may work, but it is also known to cause trouble at times. Tabs are a bad idea because they may create different amount if spacing in different editors .