Updated IDE to 2.0.2, now I2C does not work

(my very first post)
Ok,
I am very new and I apologize ahead of time if I breach any protocols. I purchased an Arduino UNO A few weeks ago and started learning from scratch. I successfully developed several projects utilizing different LCD displays and the I2C interface. Today there was an update to the IDE available and I OK'd the update. Now none of my previously working projects will compile. Something about missing the Wire.h file. I read about many Wire.h issues and that didn't help me. I tried to use "#include <Wire.h>" but that doesn't work either. Strangely, when I try to load any of the I2C examples built in to IDE, they do not load, nothing happens. Other examples load fine.
I tried uninstalling Arduino IDE and re-installing to no avail. Remember, I've only been at this for a few weeks. Here is a copy of my error message:

C:\Users\jimfa\OneDrive\Documents\Arduino\Garage temp\Garage temp.ino:2:10: fatal error: Wire.h: No such file or directory
#include <Wire.h>
^~~~~~~~
compilation terminated.

exit status 1

Compilation error: Wire.h: No such file or directory

Any help will be appreciated
Windows 10 professional 64 bit

For some reason it is looking in your project directory for that library and it’s not there . I’m not sure but there maybe issues if having it in that drive .
Check your preferences and/or download it from git hub .
There may be other reasons that someone can help with , I’m still on 1.8 waiting for the dust to settle .

Other questions

How did you install it - what steps ?
Where did you get your version 2 from ?

Is Arduino Uno still selected as the board for this sketch before performing the build?

In the IDE window, using the drop down menu under File go to Preferences and select "Show verbose output during" compile.

Please post the complete output you see from the compile.

EDIT: Were you using OneDrive backup storage when the previous version of 2.0 was working correctly?

Here is the Verbose version :

Using board 'uno' from platform in folder: C:\Users\jimfa\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Using core 'arduino' from platform in folder: C:\Users\jimfa\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Detecting libraries used...
"C:\Users\jimfa\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/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=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Users\jimfa\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino" "-IC:\Users\jimfa\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard" "C:\Users\jimfa\AppData\Local\Temp\arduino-sketch-56B91DC5D28B0E73954D8C344A4FC9AA\sketch\Latest.ino.cpp" -o nul
Alternatives for LiquidCrystal_I2C.h: [LiquidCrystal I2C@1.1.1]
ResolveLibrary(LiquidCrystal_I2C.h)
-> candidates: [LiquidCrystal I2C@1.1.1]
"C:\Users\jimfa\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/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=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Users\jimfa\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino" "-IC:\Users\jimfa\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard" "-Ic:\Users\jimfa\OneDrive\Documents\Arduino\libraries\LiquidCrystal_I2C" "C:\Users\jimfa\AppData\Local\Temp\arduino-sketch-56B91DC5D28B0E73954D8C344A4FC9AA\sketch\Latest.ino.cpp" -o nul
In file included from C:\Users\jimfa\OneDrive\Documents\Arduino\My Sketches\working sketches\Latest\Latest.ino:6:0:
c:\Users\jimfa\OneDrive\Documents\Arduino\libraries\LiquidCrystal_I2C/LiquidCrystal_I2C.h:7:10: fatal error: Wire.h: No such file or directory
#include <Wire.h>
^~~~~~~~
compilation terminated.
Alternatives for Wire.h: []
ResolveLibrary(Wire.h)
-> candidates: []

Using library LiquidCrystal I2C at version 1.1.1 in folder: C:\Users\jimfa\OneDrive\Documents\Arduino\libraries\LiquidCrystal_I2C
exit status 1

Compilation error: exit status 1

Im not sure about Onedrive, but I didn't make any changes other than upgrading IDE

Hi Hammy,
I originally installed it from : "https://www.arduino.cc/en/software" only a few weeks ago, then yesterday it prompted me to update to 2.0.2, i just hit "OK". When all of my sketches failed, i uninstalled 2.0.2 and reinstalled from the above link.

It seems that my issue may be this OneDrive thing. I tried to divorce all Arduino operations from all OneDrive activities, but I still have the Wire.h issue. I made a sketch with ONLY "#include <Wire.h>" and still get the missing file error

D:\Arduino\My Sketches\Empty sketch\Empty sketch.ino:2:10: fatal error: Wire.h: No such file or directory
#include <Wire.h>
^~~~~~~~
compilation terminated.

exit status 1

Compilation error: Wire.h: No such file or directory

Do you know where the hidden "arduino15" folder is ?
If you compile it for a Arduino Uno, then it will take the Wire library from there: arduino15/packages/arduino/hardware/avr/1.8.6/libraries/Wire/src/Wire.cpp
Try with a sketch that is located on your computer, and check if you see that path for "Wire.cpp" in the verbose compiler output.

Thank you Koepel,
Ok, I found Wire.cpp and Wire.h in the path you mentioned. I created an empty sketch with only "#include <Wire.h>" and here is the returned Verbose output though I'm sure I don't understand it yet:

Using board 'uno' from platform in folder: C:\Users\jimfa\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Using core 'arduino' from platform in folder: C:\Users\jimfa\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Detecting libraries used...
D:\Arduino\My Sketches\Empty sketch\Empty sketch.ino:2:10: fatal error: Wire.h: No such file or directory
#include <Wire.h>
^~~~~~~~
compilation terminated.
"C:\Users\jimfa\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/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=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Users\jimfa\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino" "-IC:\Users\jimfa\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard" "C:\Users\jimfa\AppData\Local\Temp\arduino-sketch-8156F2E02A198C4688B77F87FD62DC76\sketch\Empty sketch.ino.cpp" -o nul
Alternatives for Wire.h: []
ResolveLibrary(Wire.h)
-> candidates: []

exit status 1

Compilation error: Wire.h: No such file or directory

The error occurs when the Arduino build tools are trying to detect the needed libraries. It looks like when it goes to resolve the libraries it needs, it doesn't know about the Wire library for the 'uno' board / 'arduino' core combo for some reason. Have you tried uninstalling the AVR board support package and re-installing it from within the Boards Manager?

When I build the i2c_scanner sample on my machine for the uno board, I see output like this:

Using board 'uno' from platform in folder: /Users/username/Library/Arduino15/packages/arduino/hardware/avr/1.8.6
Using core 'arduino' from platform in folder: /Users/username/Library/Arduino15/packages/arduino/hardware/avr/1.8.6
Detecting libraries used...
/Users/username/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/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=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/Users/username/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino -I/Users/username/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/variants/standard /private/var/folders/wl/2v_qgl8952bcj6vvc5_hvhd80000gn/T/arduino-sketch-2BA0FE6B9F6BF859764CAE25BDC8D006/sketch/i2c_scanner.ino.cpp -o /dev/null
Alternatives for Wire.h: [Wire@1.0]
ResolveLibrary(Wire.h)
  -> candidates: [Wire@1.0]

On mine it resolved to use Wire@1.0 but on yours it fails to resolve.

Thank Robots, reinstalling the package worked!

Excellent! Happy to hear that you are back up and running again.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.