nisargsolanki:
I am using I2C communication with Sensor.. I don't know where is the problem...
The other difference with a Mega and a Nano is that the Mega has 10k I2C pullup resistors.
The Nano does not have them.
So how long is the wiring between "the sensor" and the Nano.
Problems are usually resolved faster if posters include links to the parts, real pictures of the setup, and full code (inside code tags).
Leo..