BLE nano 2.0 + I2C (MPU-9250)


#1

Hi, I’m trying to establish an i2c communication between a BLE nano 2.0 and, for instance, an MPU-9250 module.
Has anyone be able to do it using MBED or, even better, the Arduino IDE with the RedBear library for Arduino IDE ( https://github.com/redbear/nRF5x)? Any working example about I2C communication with a BLE nano 2.0 will be really appreciated.

Thank you in advance!


#2

Hi,

You can take a look at our example


#3

Hi Chi,

Many thanks for your help. I could establish an I2C with the BLE nano 2.0 (nRF5x - nRF52832).
In order to trace the data sent to the BLE nano 2.0 (master reader) from an Arduino (master writer) I had to use an FTDI FT232RL USB to TTL Serial Adapter. If connect the BLE nano 2.0 with the DAPLink board to the USB port of my PC the serial communication doesn’t work.

Finally, I’ve been able to establish a communication between a BLE nano 2.0 and an MPU-6050 module and read the data through the serial communication.
I’ve tried to avoid of using the “I2Cdev.h” library with the BLE nano because I get an error. So, I’ve used the short example sketch provided by the Arduino website (http://playground.arduino.cc/Main/MPU-6050). The obtained values don’t seem being correct, they are almost random values. However, I’m still working on it and I hope of finding soon a solution.
Any suggestions is more than welcome!


#4

Does anyone know if exist any valid “I2Cdev.h” library that works with BLEnano 2.0 (nRF5x - nRF52832)?
Unfortunately without it, the values after a few milliseconds, tend to be the same even if the gyroscope is set with a different angle (http://playground.arduino.cc/Main/MPU-60501).


#5

Did you ever end up getting this figured out? I’m struggling to get a MPU-9250 to work with BLE Nano V2 and can’t seem to get anywhere.


#6

Hi,
Did you find a solution? I stuck using this sensor with the redbear nano 2 as well. I don’t know if its from the custom Wire.h lib in the nrf5x file. Any recommendation would be welcome.
Thank you in advance
Michel


#8

Hi all,
This is the verified I2C with BLE sketch using a I2C flash which you can refer to


#9

Hello,

I am having the same issue (but with a different accelerometer). I tried using the i2c Guide posted, but for me, the code hangs at the Wire.endTransmission(); line. So even if I try to run that i2c scanner https://playground.arduino.cc/Main/I2cScanner to find the address of my slave device, it doesn’t finish because it stops at that same Wire.endTransmission(); line.

Do I need any kind of external pullup?

Has anyone had this same issue and been able to fix it? I’ve been working on it all week and couldn’t find a fix :frowning:

Thank you

Other details:
-I am using the wire.h and wire.cpp files from https://github.com/redbear/nRF5x/tree/master/nRF52832/arduino/arduino-1.8.0/hardware/RBL/RBL_nRF52832/libraries/Wire but this didn’t fix anything either.
-The i2c scanner works on the flora arduino I have

UPDATE!! I tried a new nano and it now works…so maybe some devices are just defective for i2c, because I was using those same SCL and SDA pins for GPIO previously and it works fine for that, so it’s not like those pins were fried.


#10

Hi,

I am having issues with the I2C library as well. I am trying to program an MPU9250 using I2C. I was stuck at the Wire.endTransmission without any pull-up resistors. After adding a 2k5 pull-up resistor, I ran I2C scanner http://gammon.com.au/i2c and am getting slaves at all 119 addresses.

I checked the waveform on an oscilloscope and am getting a NACK for addresses without slaves but Wire.endTransmission still returns a 0 which means transmission completed without errors.

Please let me know if there is any solution to this and if there is going to be any further development of the Wire library.

Thanks,
Priyanshi