Download Wire.h Library For Arduino

If the above fails, the Arduino core files may be corrupt. The simplest fix is:

Once the library is present, include it at the top of your sketch: download wire.h library for arduino

#include <Wire.h>

void setup() Wire.begin(); // Join I2C bus as controller/master Serial.begin(9600); If the above fails, the Arduino core files may be corrupt

void loop() // Your I2C communication here void loop() // Your I2C communication here

If your compiler is throwing an error saying fatal error: Wire.h: No such file or directory, it is almost never because the file is missing from the internet. It is usually one of three problems:

You cannot truly upgrade the hardware limit, but you can use Wire1 or Wire2 if you have a Mega or Due.