I just got my first Arduino Uno, so there may be a simple solution to my dilemma:
I'm trying to use Arduino to read a SketchFun TMP102 temperature sensor. I downloaded
https://github.com/sparkfun/SparkFun_TMP102_Arduino_Library/archive/master.zip
and followed the instructions for adding a zip library, but when I try to compile the sketch I keep getting an error that there is no Wire.h file. The sketch says that Wire.h is included with the Arduino IDE, but when I do a find Wire.h, nothing shows up. In addition, when I use Board Manager to look at the INSTALLED Arduino AVR files, there is no Wire.h present.
I'm running Arduino 1.8.8 using a Raspberry Pi 3B+.
What am I missing?
pert
February 17, 2019, 8:20pm
2
When you encounter an error you'll see a button on the right side of the orange bar "Copy error messages" (or the icon that looks like two pieces of paper in the Arduino Web Editor). Click that button. Paste the error in a message here USING CODE TAGS (</> button on the forum toolbar). If the text exceeds the forum's 9000 character limit, save it to a text file and post it as an attachment. If you click the "Reply" button here, you will see an "Attachments and other settings" link.
Arduino: 1.8.8 (Linux), Board: "Arduino/Genuino Uno"
/home/pi/Downloads/arduino-1.8.8/arduino-builder -dump-prefs -logger=machine -hardware /home/pi/Downloads/arduino-1.8.8/hardware -tools /home/pi/Downloads/arduino-1.8.8/tools-builder -tools /home/pi/Downloads/arduino-1.8.8/hardware/tools/avr -built-in-libraries /home/pi/Downloads/arduino-1.8.8/libraries -libraries /home/pi/Arduino/libraries -fqbn=arduino:avr:uno -vid-pid=0X2341_0X0043 -ide-version=10808 -build-path /tmp/arduino_build_995293 -warnings=none -build-cache /tmp/arduino_cache_205974 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=/home/pi/Downloads/arduino-1.8.8/hardware/tools/avr -prefs=runtime.tools.arduinoOTA-1.2.1.path=/home/pi/Downloads/arduino-1.8.8/hardware/tools/avr -prefs=runtime.tools.avrdude.path=/home/pi/Downloads/arduino-1.8.8/hardware/tools/avr -prefs=runtime.tools.avrdude-6.3.0-arduino14.path=/home/pi/Downloads/arduino-1.8.8/hardware/tools/avr -prefs=runtime.tools.avr-gcc.path=/home/pi/Downloads/arduino-1.8.8/hardware/tools/avr -prefs=runtime.tools.avr-gcc-5.4.0-atmel3.6.1-arduino2.path=/home/pi/Downloads/arduino-1.8.8/hardware/tools/avr -verbose /home/pi/Arduino/libraries/SparkFun_TMP102_Arduino_Library-master/examples/SparkFun_TMP102_Breakout_Example/SparkFun_TMP102_Breakout_Example.ino
/home/pi/Downloads/arduino-1.8.8/arduino-builder -compile -logger=machine -hardware /home/pi/Downloads/arduino-1.8.8/hardware -tools /home/pi/Downloads/arduino-1.8.8/tools-builder -tools /home/pi/Downloads/arduino-1.8.8/hardware/tools/avr -built-in-libraries /home/pi/Downloads/arduino-1.8.8/libraries -libraries /home/pi/Arduino/libraries -fqbn=arduino:avr:uno -vid-pid=0X2341_0X0043 -ide-version=10808 -build-path /tmp/arduino_build_995293 -warnings=none -build-cache /tmp/arduino_cache_205974 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=/home/pi/Downloads/arduino-1.8.8/hardware/tools/avr -prefs=runtime.tools.arduinoOTA-1.2.1.path=/home/pi/Downloads/arduino-1.8.8/hardware/tools/avr -prefs=runtime.tools.avrdude.path=/home/pi/Downloads/arduino-1.8.8/hardware/tools/avr -prefs=runtime.tools.avrdude-6.3.0-arduino14.path=/home/pi/Downloads/arduino-1.8.8/hardware/tools/avr -prefs=runtime.tools.avr-gcc.path=/home/pi/Downloads/arduino-1.8.8/hardware/tools/avr -prefs=runtime.tools.avr-gcc-5.4.0-atmel3.6.1-arduino2.path=/home/pi/Downloads/arduino-1.8.8/hardware/tools/avr -verbose /home/pi/Arduino/libraries/SparkFun_TMP102_Arduino_Library-master/examples/SparkFun_TMP102_Breakout_Example/SparkFun_TMP102_Breakout_Example.ino
Using board 'uno' from platform in folder: /home/pi/Downloads/arduino-1.8.8/hardware/arduino/avr
Using core 'arduino' from platform in folder: /home/pi/Downloads/arduino-1.8.8/hardware/arduino/avr
Detecting libraries used...
/home/pi/Downloads/arduino-1.8.8/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10808 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/home/pi/Downloads/arduino-1.8.8/hardware/arduino/avr/cores/arduino -I/home/pi/Downloads/arduino-1.8.8/hardware/arduino/avr/variants/standard /tmp/arduino_build_995293/sketch/SparkFun_TMP102_Breakout_Example.ino.cpp -o /dev/null
SparkFun_TMP102_Breakout_Example:26:75: error: Wire.h: No such file or directory
compilation terminated.
exit status 1
Wire.h: No such file or directory
pert
February 17, 2019, 11:06pm
4
Do you see the Wire library at /home/pi/Downloads/arduino-1.8.8/hardware/arduino/avr/libraries/Wire?
In that Wire folder I find:
2 folders: examples and src (neither folder contains Wire.h)
2 files: keywords.txt and library.properties
pert
February 18, 2019, 5:29am
6
/home/pi/Downloads/arduino-1.8.8/hardware/arduino/avr/libraries/Wire/src should contain a file named Wire.h. If not, there must be something wrong with your installation of the Arduino IDE. I recommend downloading a fresh copy and installing that.