D:\Documents\Arduino\libraries\I2Cdev/I2Cdev.h:37:10: fatal error: driver/i2c.h: No such file or directory
I am trying to make a gesture controlled robot and I am using an open source code. I get this error even though I have installed all the required libraries. Any help would be appreciated.
int16_t ax, ay;
RF24 radio(9, 10);
const uint64_t pipe = 0xE8E8F0F0E1LL;
data = map(ax, -17000, 17000, 300, 400);
data = map(ay, -17000, 17000, 100, 200);
Which board do you have selected from the Arduino IDE's Tools > Board menu?
Please post a link to where you found that code. It may provide additional context that will enable us to help you.
@pert I am using a UNO.
Here is the link to the code:
I have edited it a little bit to remove the comment lines and the gyroscope data.
The problem is that there are multiple variants of the "I2Cdev" library and you somehow managed to install the one for the ESP32 microcontroller. That variant of the library is not compatible with the Uno, which is the reason for the error.
So the first thing you need to do is remove the bad installation of the library. Do that by deleting this folder:
Please be very careful when deleting things from your computer. When in doubt, back up!
Now you will need to install the correct library. There is no information about where to find the specific version used by the author in the sketch itself and I didn't have time to watch the video or hunt for other documentation. Because they are using Arduino Web Editor, I can make an educated guess that they are using the pre-installed library from Library Manager, which is this library:
Maybe you already installed it? If not, you can install it by following these instructions:
- Select Sketch > Include Library > Manage Libraries... from the Arduino IDE's menus.
- Wait for the update to finish.
- In the "Filter your search" field, type "MPU6050"
- Press Enter.
- Scroll down through the list of libraries until you see "MPU6050 by Electronic Cats". Click on it.
- Click the Install button.
- Wait for the installation to finish.
- Click the Close button.
Now you can try compiling your sketch again.
@pert Thank you so much. This solved my problems.
You're welcome. I'm glad to hear it's working now. Enjoy!
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.