sparkfun / SparkFun_MLX90640_Arduino_Example

Controlling and reading from the MLX90640 IR array thermal imaging sensor
https://www.sparkfun.com/
Other
122 stars 35 forks source link

Problems with ESP32-S2 #24

Closed berodimas closed 2 years ago

berodimas commented 3 years ago

Hello everyone,

Is there any possible way to use this sensor with ESP32-S2? I've trying any kind of configuration but still got this output:

MLX90640 IR Array Example MLX90640 online! Parameter extraction failed Pixel 0: nanC Pixel 1: nanC Pixel 2: nanC Pixel 3: nanC Pixel 4: nanC Pixel 5: nanC Pixel 6: nanC Pixel 7: nanC Pixel 8: nanC Pixel 9: nanC Pixel 0: nanC Pixel 1: nanC

also if I change the wire clock to 100khz, I got the GetFrame Error: -8 on serial monitor.

nseidle commented 2 years ago

ESP32 S2 core is not yet respecting repeated start.

Below is good transaction with ESP32: image

Below is bad trasnaction with ESP32-S2:

image

The sensor is reporting an extra 0x0009 at the beginning of the read most likely because the S2 is releasing the bus (with a stop command) right before it initiates a read (this is bad).

Known issue that is currently slated for v2.0.1 of ESP32 Arduino core. If you can't wait, pull the most recent ESP32 Arduino core. There are fixes in place that resolve the problem.