Closed freeck closed 8 months ago
The module needs a special signal from the i2c pin for initialization (exit sleep mode) for special reasons. Due to the need to manually control the io port, but there was no reserved interface at that time, the default pin of i2c was directly used, so there would be problems you said. So if you just need to use this module alone, the easier way is to directly modify the default pin in pins_arduino.h:
@qsjhyy thank you very much for your quick response! Clear. In my case its no problem to permanently change the default io pins to 0 and 2 in arduino-pins.h. I already got it working that way.
You are welcome, the interface may be added later, easy to use!
Hi there, It seems that i am not able to change the default io-pins for the i2c communication. It works fine with pins 4 and 5 defined in arduino-pins.h but not with 0 and 2. Pins 0 and 2 works fine with other i2c devices and drivers. I tried using: Wire.begin(0.2); // Wire.pins(0,2) // no effect sensor = DFRobot_MLX90614_I2C_ADDR, &Wire);
while ( NO_ERR != sensor.begin() ) { ....error message occures } Perhaps you have a better code-snippet?
I am using an esp8266 board. Sloeber IDE. Ps: I will try the Arduino IDE as well! -》same result