Good afternoon hivemind. I need some assistance getting the I2Cdev Library installed. Ive tried extracting the files from the zip and storing it with the rest of my libraries. When opened the folders are empty and i have nothing to select.
When i try to add the zip file itself I get the following error. "Error: 13 INTERNAL: Library install failed: moving extracted archive to destination dir: library not valid"
I have that 'library' installed, but it isn't a proper library. Here is what it looks like but TBH, I don't know if I ever used it or if it is valid at all. Most code I have that uses I2C uses the Wire library.
Hi @jedunlimited. Whenever possible, you should use Arduino IDE's "Library Manager" or "Add .ZIP Library..." features to install libraries as those are the most convenient and reliable methods. Unfortunately, as is explained by the message from the developer of the "i2cdevlib" project, which @sonofcy shared, it is not possible to use them to install this library. So in this case it is necessary to do a manual installation.
I'll provide instructions you can follow to do that:
Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
The "Preferences" dialog will open.
Take note of the path shown in the "Sketchbook location" field of the dialog.
Click the "CANCEL" button.
The "Preferences" dialog will close.
Select Download ZIP from the menu.
A download of the ZIP file of the library will start.
Wait for the download to finish.
Extract the downloaded file.
Copy the Arduino/I2Cdev subfolder from the extracted folder to the libraries subfolder of the path you saw in the "Sketchbook location" preference.
The folder structure of the installation must look like this:
(where <Sketchbook location> is the path from the Sketchbook location" preference)
Select File > Quit (or Arduino IDE > Quit Arduino IDE for macOS users) from the Arduino IDE menus.
All Arduino IDE windows will close.
Start Arduino IDE.
The "i2cdevlib" project also provides several other Arduino libraries for various devices that use I2C communication. If you want to use any of those libraries in addition to the "I2Cdev" library you installed, you can use the procedure I described above to install them. You only need to select the appropriate folder from the Arduino subfolder of the extracted download.
Even though the choice to put all the libraries into a single repository instead of using a dedicated repository for each is unfortunate, this is a very high quality library that is used extensively by the Arduino community.