-
Notifications
You must be signed in to change notification settings - Fork 37
Closed
Description
Hi,
I am trying to use MLX90640 with ESP8266 and run Example1_BasicReadings.
But, I have not been able to get I2C communication to work.
Call to MLX90640_DumpEE > MLX90640_I2CRead > Wire.endTransmission(false) returns 2 or 3. Sometimes call to MLX90640_DumpEE hangs.
I am using frequency 100KHz. I have seen issue #2 and melexis/mlx90640-library#13.
Below is the output I get.
MLX90640 online!
No ack read
Pixel 0: 884.73C
Pixel 1: 0.00C
Pixel 2: 573.09C
Pixel 3: 0.00C
Pixel 4: nanC
Pixel 5: 0.00C
Pixel 6: nanC
Pixel 7: 0.00C
Pixel 8: nanC
Pixel 9: 0.00C
No ack read
No ack read
I have also modified core_esp8266_si2c.cpp > twi_readFrom function to handle len=0
unsigned char twi_readFrom(unsigned char address, unsigned char* buf,
unsigned int len, unsigned char sendStop){
...
for(i=0; i<(len-1); i++) buf[i] = twi_read_byte(false);
buf[len-1] = twi_read_byte(true); //original
....
}
to
unsigned char twi_readFrom(unsigned char address, unsigned char* buf,
unsigned int len, unsigned char sendStop){
...
if (len > 0) {
for(i=0; i<(len-1); i++) buf[i] = twi_read_byte(false);
buf[len-1] = twi_read_byte(true);
}
....
}
Please let me know if you have any pointers to solve this.
@nburnett, I saw your comment that you were able to connect MLX90640 with ESP8266, can you please share more information about the same.
Thanks in advance.
Regards,
Vishal Kothari
Metadata
Metadata
Assignees
Labels
No labels