Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By José Curva
#81046 Hello, I'm trying to change the factory address of a MLX90614. I'm using the NodeMCU ESP-12e with the Arduino IDE. I tried running the code in this link https://chrisramsay.co.uk/posts/2017/09/arduino-and-multiple-mlx90614-sensors-take-two/ . However, I can't run the i2cmaster.h library, since I get the error:
In file included from C:\Users\josec\Desktop\mudar_address_MLX1\mudar_address_MLX1.ino:5:0:

C:\Users\josec\Documents\Arduino\libraries\I2Cmaster/i2cmaster.h:88:20: fatal error: avr/io.h: No such file or directory

#include <avr/io.h>

^

compilation terminated.

exit status 1
Erro ao compilar para a placa NodeMCU 1.0 (ESP-12E Module). [translation: error compiling for NodeMCU 1.0 (ESP-12E Module) board]


I've researched through the web and I found out that the i2cmaster.h library only works in boards with AVR architecture, which is not the case of the NodeMCU. Is ther an alternative to change the address of the MLX90614?
Thank you all
User avatar
By DIRR70
#81376 Hello José Curva,

your problem is that the example code for the MLX90614 was written for an ATMEL CPU not for an ESP.
You can simply use
Code: Select all#include <Wire.h>

instead. This is the I2C library for ESP. The syntax is a little bit different, but not much. Google it ;)