ArduinoRobot.h and Wire.h


I´m trying to compile a project with theses tow libraries <ArduinoRobot.h> and <Wire.h> but doesn,t work. I don´t know if there is any incompability with these libraries.

Thanks in advance.

Hi, how does it not work, compilation error or after upload an output problem? What version of adruino IDE are you using?

Tom... :)

Hi, my IDE version is 1.5.4 and when i try to use both libraries I have a lot of errors in the compilation. I have done many test and only writing #include <ArduinoRobot.h> and #include<Wire.h> the project give me errors. If I delete one of them (Robot or wire) and its code the proyect works.

Hi, today I´ve been another test and also I have the same problem. In this case I used <ArduinoRobot.h> and <Sevo.h> a"Impossible to complie. this is the error:

avr\Servo.cpp.o: In function __vector_17': D:\Arduino\libraries\Servo\arch\avr/Servo.cpp:78: multiple definition of __vector_17’
avr\Melody.cpp.o:D:\Arduino\libraries\Robot_Control\arch\avr/Melody.cpp:7: first defined here


Hi can you post your code using the code tags and we will see if there is a conflict, how have you developed this sketch, a part at a time or tried to write it all at once.

Tom..... :)

The ArduinoRobot.h library already includes the wire library:

hi, this is the code, it is very simple because I have the robot one week ago.

#include <ArduinoRobot.h>
#include <Servo.h>

int trigger = D3;
int echo = D5;
double distance;

void setup() {

void loop() {
Robot.digitalWrite(trigger, LOW);
Robot.digitalWrite(trigger, HIGH);
Robot.digitalWrite(trigger, LOW);
if (distance<30)Robot.motorsStop();
else Robot.motorsWrite(100,100);

When I delete the Servo library I can compile.

Thankss :slight_smile:


Hi Angel, I think

int trigger = D3;
int echo = D5;

should be

int trigger = 3;
int echo = 5;

I don't have the arduinorobot library for some reason, so when I get it I'll try and get it to compile.

Tom.... :)

Hi guys:

I needed to assess the I2C pins on the Arduino robot control board, from the website ( ) I understand that the "Wire" library is already included in the arduinoRobot.h. But the problem is what are the equivalent commands? e.g. what is the equivalent of "Wire.requestFrom(2, 6)"?

Appreciate if anyone could give me some guidance.

Best Wishes, Sean

Hi, I have also problems compiling Arduino robot sketches...I think the library Arduinorobot.h doesn't work. The error is: "Error Compiling" I have Arduino 1.0.6. How can I get this library and run all those arduino robots sketches? Thank you

LM Simarro

TomGeorge: Hi, how does it not work, compilation error or after upload an output problem? What version of adruino IDE are you using?

Tom... :)

Sir, I too have a similar problem... when i use ArduinoRobot.h library in any program it never gets compiled.... I am using vetsion 1.6.7 . Please reply... what should i do...eve the examples could not be compiled...please reply.