-->
Page 1 of 1

ESP8266 (ESP-12E) and Adafruits MLX90614

PostPosted: Wed May 13, 2020 9:07 pm
by internetgardener
Hi Everyone,

First time poster. In the past I have been able to figure out everything that I have needed for so many IOT things but this one is really stumping me.

I have an ESP-12E and have been trying for several days to get it going with Adafruits Infrared Temp sensor: https://learn.adafruit.com/using-melexi ... g-and-test

So here is where I am at:
1) I have used my Mega2560 R3 to prove that the sensor works, my wiring is correct, and I get accurate results (ya - score 1 for the good guys).
2) I have hooked to sensor to my 8266 and I am able to use one of the I2C scan tools (taken from the internet) - using arduino IDE console to show that the sensor is found - and the sensor has the right address. 0x5A (another win for the good guys)!
3) But as soon as I upload the mlxtest sketch that adafruit provides - it can't communicate with the sensor to get the results (Boo!). I have been banging my head agains't the wall for several days trying to figure why it works with Mega but not the 8266. I have also tried with an ESP32 - with similar results to the ESP8266.

I am not hard core programmer so I haven't really dived in the library adafruit provides as it is out of my 'pay grade'.

Does anyone have any ideas where I might start to look?

Thanks in advance,
Curt

Re: ESP8266 (ESP-12E) and Adafruits MLX90614

PostPosted: Fri May 15, 2020 3:41 pm
by schufti
you did see this warning on the adafruit webpage?
This sensor uses a slightly non-standard type of I2C called "repeated-start". If you are not using an Arduino, make sure your microcontroller can support "repeated start I2C requests"!
This should at least trigger an alarm on your side

The implementation of i2c on the esp8266 is a sw one and not all "features" of i2c are fully present. There is some reference to "repeated start" in the relevant code but if this is 100% compatible ...

You would probably need a logic analyser to compare the communication on the i2c bus to locate the problem.