Ok, code is from examples for L3G, it works on uno, but don't work on mega. Don't think it need to be checked.Addresses are default, that proved by uno run.Using this imu: http://www.pololu.com/catalog/product/1265

I don't use any resistors. Tried to use 3.3V and 5V, imu board uses vin voltage for I2C voltage.

Thanks for that.Unfortunately (for you) everything looks fine with that to me. You could have the two lines swapped over on the Mega but I can't see one way or the other from the photograph.Have you done anything else with the I2C on the Mega? It could be that those pins are damaged.Try blinking an LED on them.