Wire.endTransmission() Hangs
The device ID and every other stuff is working fine. The only issue being that my code gets stuck at Wire.endTransmission().


Nothing is transmitted until you call Wire.endTransmission() so that is where it will hang.

You should not try to do Wire transmissions inside an ISR (if you are doing that).

There is an alternative to the Wire library which times-out rather than hanging. It is at: Arduino I2C Master Library.

Make sure you have pull-up resistors on SDA and SCL. Typically 4.7 k from both to +5 V.

If none of that helps, please post your code.