Wire.endTransmission does not return anything.

Under following circumstances, Wire.endTransmission will not return anything causing MCU hang.

1) SDA, SCL are connected properly to i2c sensor 2) i2c sensor is not powered.

Ideally, if sensor is not powered, library should return some kind of error instead of waiting forever.

However, if power is restored to sensor, everything works as expected.


Arduino board: Leonardo & nano v3 Sensor: adafruit's 10dof

I'll really appreciate for your help.