Closed ysshah95 closed 5 years ago
Hmm. That is odd. I'm not entirely sure but let's eliminate a handful of things:
It sounds kind of like I2C is not working but I would have expected the code to fail earlier.
Ok - The Qwiic board already has pull up resistors so you shouldn't need additional ones (shouldn't hurt though). Have you got a logic analyzer? Can you confirm the Due's I2C port is performing as expected?
I don't have the logic analyzer but I will somehow confirm the working of Due's I2C port. Do you think changing the controller to Teensy 3.5 would be the perfect option if I2C of Due is not working?
I took a help from this Arduino Forum (https://playground.arduino.cc/Main/I2cScanner) to check the working of I2C of Due, and to my surprise, the I2C of Due is working and it displays "I2C device found at address 0x33 !", message every 5 seconds.
Good - that means the sensor is at least acknowledging I2C traffic.
Changing the controller to a Teensy would eliminate one unknown. I'll see if I can get a Due and test things out.
Okay, that would be a great help. Thank you so much.
Same problem as above with an ESP32
Okay. So, is it recommended to change the sensor?
No, the sensor is perfectly fine, so is the code here. I haven't tweaked it yet. Will get back with results for ESP32 Arduino .. Meanwhile this might help you with a raspberry pi https://github.com/pimoroni/mlx90640-library
The issue is definitively related to the Wire implementation in the Due. I had the same problem but switched to a Teensy 3.2. I didn't investigate the problem to the end but you can search the web for Due & I2C issues.
Whew. I've spent some time on this and cannot reach a resolution. The Due I2C library and hardware seem buggy.
Above is an image of the Due glitching the clock line. Wire and Wire1 ports both exhibit this bad behavior.
Attached is the code I was using to test. This is as far as I can take it at the moment.
Hmm. Here's the code again.
Thank you so much for the help. I really appreciate your effort. I recently changed my controller from Due to Teensy 3.5, and the library works fine.
But, I also tried the latest Due example you attached in the last comment, but still, it doesn't work. I think it gets stuck in one of the function "MLX90640_DumpEE". I have attached the screenshot of the terminal.
Indeed, the Due Example I attached does not work, it's only an example of the changes that were started in an attempt to change the lib. The example can be used to inspect the clock glitches from the Due.
Hello, I have been using MLX90640 with Arduino Due and after uploading the Basic_Reading program I get a message in serial monitor saying "Parameter extraction failed" and the pixel values are displayed as nanC.
Any ideas what I might try?
Thank You Yash Shah