Problem with FTDI and BLE Nano V2 + i2c setup


#1

I’m completely new to these boards and have been really struggling to get started as most of the examples I find are using Arduino boards, and I am using a BLE Nano V2, though I am programming in Arduino.

The first issue is that I need to be able to see serial data from the BLE Nano while it’s in my circuit. Stacking it on the DAPLink doesn’t really do any good, since I have to take it out of the circuit, unless I’d wire out from the breadboard to the headers on it remotely. So I picked up a Sparkfun FDI basic 3.3V board to use so I can interface with it. I installed the FTDI drivers, and hooked it up how I thought it should be, since I have found no literature on hooking this up to the Nano. I hooked up as follows: FTDI-BLE such that GRN - RTS, CTS - P0_28, TXO - P0_29, RXI - P0_30, 3V3 - 3.3V, GND - GND.

Set up this way, if I open the serial monitorin Arduino, I see what I wrote the program to print, so it’s working. However, I can’t upload a sketch to the Nano, which I thought I’d be able to do. It says “the selected port does not exist or your board is not connected” I’m not sure what the problem is. If I have to pull the Nano out of the circuit and put it in the DAPLink every time, I might as well remotely wire to the DAPLink, I know it’ll work that way. What’s the issue with the FTDI?

Also, I’m trying to get data from an MPU9250 breakout board. From what I understand, I need to use i2c. I’m totally lost on how to set this up, both in hardware, and in software. Again, the examples I find aren’t doing this with an a BLE Nano V2, they’re using Arduino Pro Minis or something similar. What pins do I need to use on the BLE Nano to hook up to the SCL and SDA pins on the MPU9250?


#2

Can anyone help me get started with this? Mostly right now I’d like some help with hooking up the MPU9250 and possibly some help with libraries that I could use to get started with programming.


#3

Hi, I was able to get the BLE NanoV2 hooked up to the MPU9250 using the Arduino 1.8.5 IDE using the following method:

  1. Update Wire.cpp and Wire.h from the official repository (https://github.com/redbear/nRF5x/tree/master/nRF52832/arduino/arduino-1.8.0/hardware/RBL/RBL_nRF52832/libraries/Wire). For me, their library locations was ~/Library/Arduino15/packages/RedBear/hardware/nRF52832/0.0.2/libraries/Wire
  2. Add a line #include "Arduino.h" to the Wire.h file (needs it for the i2c_t type)
  3. Use the library SparkFun MPU-9250 DOF IMU Breakout. You’ll have to remove setting and writing to the intPin (pinMode(intPin, INPUT); digitalWrite(intPin, LOW);), as well as changing myLed value to D13 (the built-in LED pin)
  4. You can now test that it works using a breadboard, the 9250 module, the developer kit and the nano2 board with the following connections (with wires):
developer kit → nano2:

Vin → Vin
GND → GND
TX → RX
RX → TX

nano2 → 9250:

VDD → VCC
A2/D2/SDA0 → SDA
A3/D3/SDA0 → SCL
GND → GND

When compiling, there will be a couple of errors but you should be able to see serial output. Couldn’t figure out how to get it to appear in the Arduino IDE but the following minicom command should work (port, baud may differ):

minicom -b 9600 -D /dev/cu.usbmodem1442

Hope it helps!