-
Notifications
You must be signed in to change notification settings - Fork 19
mlx.getFrame(frame) returns "math domain error" #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
By basic example, do you mean the
|
Apologies and and happy to clarify! I have my export BLINKA_MCP2221=1 set correctly and the error is in regard to the python3 mlx90640_simpletest.py Everything seemed to be working correctly when running the program. I get the "MLX addr detected on I2C" and the serial number of the device. When the following lines of code are run (I added the "as e" and "print e" to figure out what is happening in the library ) I print the ValueError each iteration as "math domain error" so I would guess a cos value or something is incorrectly being calculated. Thanks for your help! |
After debugging a bit, the error occurs in the second iteration of "self._CalculateTo(mlx90640Frame, emissivity, tr, framebuf)". I was able to replicate on a raspberry pi so it is probably related to some math feature of python in Linux. I'll see if I can figure out a solution. Fingers crossed! |
I also am encountering this exact same error and started debugging the same way that @AutomatedAI did (with printing the exception). When I did this, I received the following:
When I set
I am not sure if it matters but I am attaching the MLX90640 to the RPi using Qwiic connectors and a Sparkfun pHat. I will continue to debug tomorrow to see if I get anywhere. |
After some more digging, I believe this is related to this PR: #18 If I make the following dirty hack to the
My board has two broken pixels that causes Sx to be negative so the code chokes when calculating the sqrt. Is there a way to get the PR mentioned above merged and released? |
A third user on discord help-with-circuitpython has reported the same problem. |
going to close with the assumption #18 fixed it. if not, we can re-open! |
Hello,
I am trying to run the basic example to stream data over i2c through the MCP2221. The Serial number is pulled from the MLC90640 easily but each time mlx.getFrame(frame) is called I get a "math domain error" if I print the exception. Any ideas as to why this may be happening? I am using Ubuntu 16.04 and python 3. Thanks!
The text was updated successfully, but these errors were encountered: