Author Topic: I2C (via Wire library) and RFduinoBLE.begin()  (Read 918 times)

MattG

  • RFduino Newbie
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
I2C (via Wire library) and RFduinoBLE.begin()
« on: August 05, 2015, 02:01:40 PM »
I have a sensor hooked up via I2C and use the Wire library on standard pins 5,6 to interface with it. This works well as verified by serial debugging. If I enable bluetooth with RFduinoBLE.begin(), my I2C bus communication fails. From looking at the documents, it seems that the bluetooth module uses TIMER0. However, the I2C bus should use the TWI hardware that is separate from this... Is there a dependency that I'm missing?

Here is a small sketch that replicates the problem. Commenting the RFduinoBLE.begin() and everything works as expected.

(Digging deeper into the I2C failure, it seems that my first read from my sensor works. It can write a device address, write a register read command and then request the result which it correctly gets. However, after I write some configuration registers on the sensor this exact sequence fails. All of this works with BLE off.)

Edit: Using Rfduino 2.3.1 in Arduino 1.6.3
« Last Edit: August 05, 2015, 02:34:37 PM by MattG »

 

anything