Intel® Makers
Intel® Edison, Intel® Joule™, Intel® Curie™, Intel® Galileo
Announcements
Welcome - This is a Peer-to-Peer Forum only. Intel has discontinued these products but you may find support from other customers on this Forum
9869 Discussions

Missing Wire.h file in the arduino 1.5.3

Mukesh_B_Intel
Employee
1,067 Views

Hi,

I am writing a simple example for servos using the Servo package. When uploading the sketch to Galileo, compilation fails with an error

In file included from servo.ino:1:0:

/arduino-1.5.3/hardware/arduino/x86/libraries/Servo/Servo.h:5:18: fatal error: Wire.h: No such file or directory

compilation terminated.

The example being attempted is shared below and is based on http://ardx.org/CIRC04 http://ardx.org/CIRC04

# include

Servo servo1;

void setup() {

// put your setup code here, to run once:

servo1.attach(9);

}

void loop() {

// put your main code here, to run repeatedly:

for(pos=0;pos<180;pos +=1) {

servo1.write(pos);

delay(15);

}

for(pos=180;pos>0;pos -= 1) {

servo1.write(pos);

delay(15);

}

}

Thanks

Mukesh

0 Kudos
1 Solution
RMitc1
Valued Contributor I
162 Views

The path to Wire.h in Arduino 1.53 is:

arduino-1.5.3\hardware\arduino\x86\libraries\Wire\Wire.h. Wire.cpp lives there too.

To fix it include Wire.h in your sketch: # include

Bonus fix: You don't define pos for your for statements. Make two changes like: for(int pos=0;pos<180;pos +=1),

or define int pos somewhere else.

View solution in original post

1 Reply
RMitc1
Valued Contributor I
163 Views

The path to Wire.h in Arduino 1.53 is:

arduino-1.5.3\hardware\arduino\x86\libraries\Wire\Wire.h. Wire.cpp lives there too.

To fix it include Wire.h in your sketch: # include

Bonus fix: You don't define pos for your for statements. Make two changes like: for(int pos=0;pos<180;pos +=1),

or define int pos somewhere else.

View solution in original post

Reply