i’ll try to make it short.
Im facing a really weird issue with an i2c sensor.
I have a sensor that communicate with i2c.
The problem is, when Wire.endTransmission is called, the value returned from the function is 3. but when i run i2c scanner the value returned from Wire.endTransmission is 0.
(i2c scanner is checking addresses from 0 to 127 and calling Wire.beginTransmission and Wire.endTransmission for each address, then returns the addresses that returned 0 when Wire.endTransmission called).
So, i tried to do the same as i2c scanner in my code, but got 3 again when Wire.endTransmission called.
(what i tried to do is Wire.beginTransmission(sensorAddress) and right after that calling to Wire.endTransmission() and checking the returned value).
From what read, the returned value meaning is, received NACK on transmit of data.
I really have no idea what can be the cause for this problem.
(im using other devices that comuunicating with i2c and there is no issues with them).
Thank you in advence!