BLE/DC/Servo Multiple libraries were found for "Wire.h"
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

BLE/DC/Servo Multiple libraries were found for "Wire.h"

by Virgil_Machine on Mon Apr 15, 2019 12:13 pm

Update 2019-04-16 15:55 UTC: see below for the so far, so good verbiage. I still have a question: as noted below, when I include the Adafruit_BLE and associated libraries, the additional tabs for BluefruitConfig.h and PacketParser,cpp do not appear. There is reference in the Learning System entry for the Feather 32u4 BLE board, but no instruction on how they should get there. I added them and pasted code from existing sketches, but the tutorial just says to go into BluefruitConfig.h and make changes. If I did not have other code using the library, I would not have been able to do that. I tried closing the sketch and reopening, and closing the IDE (v1.8.9) and restarting. All my boards and libraries are up to date. Am I doing something wrong?

I got it to compile. Can't say that it works yet, I still have to test. I found an old sketch based on the "Bluefruit LE Feather Robot Rover" sketch in the Learning System. It had Bluefruit and the DC motor shield code, so I added some Servo code and it compiled. The only difference I could see between that and my new sketch is that my new sketch, based on the "controller" example in the Adafruit BLE library had a lot of code regarding Factory reset and the like that was not in the Rover sketch. So, I deleted all that and it worked. I will not go back to see exactly what was wrong (at least not until I have the time to be curious), but something is amiss.

In my research I learned that the cryptic "wire.h" message means "you screwed something up and it's probably something to do with a library."

Original Post
I've seen a bunch of posts on this topic, but none match my problem (at least as far as I can see).

My project (a rover with DC motors driven by the adafruit DC motor feather wing and a gripper claw on the Feather 32u4 BLE board) will not compile, giving the subject error. I plan to use the BLE android app controller function.

It's fine with BLE and the Motor wing, and it's fine with the motor wing and the arduino servo.h library. When I combine all three (or just BLE and servo), I get the duplicate wire.h message. I'm guessing it's an SPI conflict but I'm not sure and I don't know how to fix it if it is.

Also, strange is that in other sketches using the Adafruit BLE library, tabs are added for the BluefruitCongfig.h and packetParser.cpp but not this time, so I added them manually (copying from other sketches). It won't compile without that--"BluefruitConfig.h not found.

What am I missing?

Thanks for your help, as always.

Posts: 101
Joined: Sun Apr 13, 2014 6:39 pm

Please be positive and constructive with your questions and comments.