Adafruit_I2CDevice.h No such file or directory

In this article, I will explain how to fix the Adafruit_I2CDevice.h No such file or directory when using the Adafruit library.

Adafruit is one of the manufacturers of electronic devices such as Arduino variant boards and sensors, they are also the best contributor to the Arduino IDE library. It is convenient and free to use. You can use this library as you like.

One of the most popular libraries is Adafruit OLED, which contains a complete function for controlling Oled and some examples you can use. However, using the library from Adaftuit is not as easy as imagined. There are some conditions, one library will depend on another library made by them.

About adafruit_i2cdevice library

The Arduino library “Adafruit_I2CDevice” allows the microcontroller to communicate with various I2C devices such as sensors, actuators, and displays. This library provides base classes for I2C devices, simplifying communications and reducing the need to write code. This library can be used for Arduino platforms, including ESP8266 and ESP32.

No such file or directory

This article was created when I got the error fatal error: Adafruit_I2CDevice.h No such file or directory when using an OLED SSD1306 on Arduino.

OLED will require 2 main libraries from Adafruit, Adafruit_SSD1306 and Adafruit_GFX library. But after the libraries were installed, I got this error.

Why this happened?

After I searched for this problem from various sources on the internet, I got the result that this error occurs because of missing one more library and I have to install it because in the library there is one required function.

How to fix fatal error: Adafruit_I2CDevice.h No such file?

To fix the fatal error: Adafruit_I2CDevice.h: No such file or directory, just add the Adafruit BusIO library. It’s very easy, just follow these steps.

  • Open Arduino IDE
  • Click the Sketch Menu -> Include Library -> Manage Libraries
  • Search BusIO
  • Then click Install it and wait until it’s finished.
Adafruit_I2CDevice.h No such file or directory

After finishing, try to re-compile the Arduino code, and whoala… The error has gone. I hope this Adafruit_I2CDevice h No such file or directory article is useful.

> Build your own Compas using Arduino Magnetometer
> Adafruit_Sensor.h: No such file or directory
> INA219 Arduino Basic Code, Library, and Tutorial
> Show a Degree Symbol Serial Monitor Arduino
> MG995 Servo Arduino Code Continuous Rotation
> RFID RC522 Arduino Basic Code Tutorial
> Stray 302 Arduino, How to Fix It?
> Burn Bootloader Attiny13 Arduino
> Change Font Arduino IDE Editor

Similar Posts