Works on Arduino Uno but not on Arduino mini V5

Hello Pundits, I am a newbie in the world of arduino and it has been amazing experience so far.

I have an arduino uno and arduino mini v5. I am trying to connect a sensor (i2c communication) and adafruit bluefruit le (SPI Communication). I was successful in getting to talk to the sensor via bluetooth using arduino uno.

However when I tried to replicate the same using arduino mini which has the same pin-out as the uno, it doesn't work.

Arduino Uno = Can communicate with sensor using bluetooth - spi and i2c both working fine at the same time.

Arduino Mini = Can communicate with sensor and bluetooth both individually but not concurrently. I2C pins on the mini are working fine as I am able to get data from the sensor, bluetooth part is also working fine as I can set pins on the mini using bluetooth. But when I want to do both, Arduino mini breaks out on the I2C part and I have no idea why.

Anyone have similar experience with Mini and if so what did you do to overcome it ?

-Chris

I think I found the problem but not the solution.

program block

Bluetooth(connection establish)

//for i2c wire.beginTransmission(address) code to activate the sensor wire.endTransmission()

wire.requestFrom(address, no of registers) { results }

BTLEserial.print(results)

wire.endTransmission seems to be the issue - it doesn't affect Uno but it does on the mini. I think I am doing this wrong for mini, something is happening at that line that hangs while using mini but Uno has something else that overcomes this. Any thoughts ?

Can anyone guide me to a solution ?

Why does the Mini hangs on wire.endTransmission() only when I have the mini to do both SPI and I2C but doesn't hang on the exact same instruction when running I2C only using mini.

I did play around with other library (http://www.dsscircuits.com/articles/86-articles/66-arduino-i2c-master-library) and still doesn't work.