Anyone successful with i2c on BLE Nano 2?


#1

Hello,

I was trying to interface a BMP 180 with BLE Nano V2. To get started, I tried building the SW twi_master and then when I checked the ping config I realized that the pins are P0_2 and P0_28. I changed these numbers in the header file and tried flashing the code. My sensor was not identified.

I tried checking the SCL0 line on the CRO and I see that the lines arent even pulled up. I see that there are internal pull-ups on i2c lines but I do not see them in action. Am I missing something? Are the pins right?

Please help.

Regards,
Shankar


BLE Nano 2: using I2C and UART simultaneously
#2

Hi Shankar,

I have got good and bad news.

I2C does work with Nano v2 hardware but it won’t run under default Arduino ROM. Try flashing your Nano v2 with Apache MyNewt. The learning curve is steep but you have a full control of the device.

Kind regards,
Lukasz


#3

Hi Lukaszw,

Can you please tell me where RedBear has written I2C does not work with the Nano 2 and Arduino?

I am using a Nano 2 at the moment connected to an OLED SSD1306-based display over I2C, and it works well.

I am including Wire.h an edited version of Adafruit’s Adafruit_SSD1306 library.

Regards,
tangesazen


#4

Hi Tangesazen

I have been able to use the nano v2 with i2c. Be sure to use their library here


#5

Hi Tangesazen,
Please send me the Wire.h edited version you mention in your post.
I am trying to make a Sparkfun MS5803 to my Redbear NanoV2 and it is giving me compile errors.
Cheers,


#6

Hi, I face a problem of compatibility with OLED & other sensors. I don’t know where to go. Could you tell me how you change the Adafruit SSD lib? Just to give me a start.
Thank you in advance.
Michel


#7

Regarding the Sparkfun MS5803, I don’t have that sensor but I was able to compile Sparkfun’s example when I added:

#include <Arduino.h>

before:

#include <Wire.h> in Sparkfun_MS5803_I2C.cpp.


#8

Regarding what I did to get the Adafruit libraries working with Wire.h>.
Actually I just commented out the SPI code. It was a quick and easy way to get the SSD1306 to work.

I’m sorry but I haven’t used the Nano 2/Blend 2’s with Arduino for a long time. Nowadays I’m using VisualGDB and the Nordic SDK, which works well.