NodeMCU + Arduino IDE + MPU6050


I am a beginner at the Arduino IDE and am facing a lot of trouble using libraries with it.

I have interfaced my NodeMCU v3 breakout board with the IDE - and successfully run few examples. Wrote a small PWM LED driving code for myself too, to know if I have actually understood or am only freeloading the example codes.

Trying to interface an MPU6050 with the NodeMCU to read the values off DMP. I wanted to use the trusted and easily available I2CLib for the purpose… when I try to include the library and “verify” the code, I get the following error.

I tried searching the internet for the error - couldn’t find it. Either it is an EXTREMELY silly mistake, or I am truly unique. I cant find the file anywhere.

Can someone help me out?

In file included from C:\Users*****\Documents\Arduino\MPU6050\Examples\MPU6050_DMP6\MPU6050_DMP6.ino:46:0:
sketch\I2Cdev.h:37:24: fatal error: driver/i2c.h: No such file or directory
#include <driver/i2c.h>
** ^**
compilation terminated.
exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module).

I wanted to use the trusted and easily available I2CLib for the purpose

Great idea. An even better idea is to post a link to this mysterious "easily available" library.

An even better idea, though, is to NOT assume that every library that works with one Arduino model will work with every Arduino model AND every non-Arduino device.

My bad,

please forgive me. - for some reason i forgot to mention dev.

Will learn to specify correct information, and yes, will learn more so I can give back to this community.


I was able to compile one of the MPU6050 examples without errors for an ESP8266. I am still waiting for my MPU6050 boards from China.

Be sure to install the libraries in the correct directory. Adafruit has a good tutorial on this topic.