My receiver code is fine but in my transmitter code I'm getting the following error-
C:\Users\USER\Desktop\arduino coads\gesture_controlled_transmitter\gesture_controlled_transmitter.ino:7:55: fatal error: i2cdev.h: No such file or directory
#include "i2cdev.h"//The main library of the nRF24L01+
^
compilation terminated.
exit status 1
Error compiling for board Arduino Nano.
Invalid library found in C:\Program Files\Arduino\libraries\i2cdevlib-master: C:\Program Files\Arduino\libraries\i2cdevlib-master
Invalid library found in C:\Program Files\Arduino\libraries\i2cdevlib-master: C:\Program Files\Arduino\libraries\i2cdevlib-master
I have even added the i2c-dev library to my arduino libraries file from this link-
I have checked all the compiling options and connections every thing is all right but still I'm getting this error.
GitHub - jrowberg/i2cdevlib: I2C device library collection for AVR/Arduino or other C++-based MCUs is a collection of many different libraries for multiple platforms. Unfortunately this makes it a bit less likely to install for use with the Arduino IDE. You can't just drop the whole repository into your libraries folder, as you have done. Libraries must be installed directly under This is the cause of the "No such file or directory" error and also the "Invalid library found" warning.
Do this:
Move C:\Program Files\Arduino\libraries\i2cdevlib-master\Arduino\I2Cdev to {sketchbook folder}\libraries. You can find\set the location of {sketchbook folder} in the Arduino IDE at File > Preferences > Sketchbook location.
Do the same for any other libraries from the i2cdevlib project you want to use with the Arduino IDE.
You should never install any library to C:\Program Files\Arduino\libraries because everything installed to that location will be lost whenever you update to a new version of the Arduino IDE. That will not happen to libraries installed to your sketchbook folder.
If you want to fix the "Invalid library found" warning then you must either move C:\Program Files\Arduino\libraries\i2cdevlib-master\Arduino\I2Cdev somewhere else or else delete it.
Hello Pert sir thank you for your reply I tried doing what you said the invalid library error is gone but the other one still exists .I have also tried adding a zipped library but when I'm adding that I'm getting the error that "Specified folder/zip file does not contain a valid library".
pert:
Move C:\Program Files\Arduino\libraries\i2cdevlib-master\Arduino\I2Cdev to {sketchbook folder}\libraries. You can find\set the location of {sketchbook folder} in the Arduino IDE at File > Preferences > Sketchbook location.
If you did that then the error "fatal error: i2cdev.h: No such file or directory" should no longer occur.
kamehamehakosu:
I have also tried adding a zipped library but when I'm adding that I'm getting the error that "Specified folder/zip file does not contain a valid library".
That's because you can only use Sketch > Include Library > Add .zip Library with .zip files that contain the library in the root of the .zip file but the .zip file you download from GitHub - jrowberg/i2cdevlib: I2C device library collection for AVR/Arduino or other C++-based MCUs does not have the library in the root since it's a collection of many libraries for several platforms, all in their own subfolders. So you need to do a manual installation following my previous instructions, not the Arduino IDE's Add .zip Library feature.
Alternatives for MPU6050.h: []
ResolveLibrary(MPU6050.h)accelerometer_program:2:10: fatal error: MPU6050.h: No such file or directory
-> candidates: [] #include <MPU6050.h>
^~~~~~~~~~~
compilation terminated.
Using library Wire at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire
exit status 1
MPU6050.h: No such file or directory
I have removed the I2Cdev file to the sketchbook folder but still this problem occurs. please help me to run the code