I just did a clean install of Arduno 1.8.5 on my Raspberry Pi 2. It seemed to go okay and I can launch the application. But I can't find where the standard libraries are stored.
They used to be in /usr/share/arduino/library, but the /usr/share/arduino folder no longer exists. The libraries must be someplace because when I compile the following sketch it gives me no errors:
#include <Wire.h>
#include <SPI.h>
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
And yes... I've checked and they are not in my sketchbook/libraries folder either.
Where are these libraries located on the RPi under 1.8.5?
Here's the easiest way to find the location of a library:
File > Examples > select an example from the library you want to find
Sketch > Show Sketch Folder
This will open the example sketch folder, which is in a subfolder of the library. Note that some libraries are bundled with hardware packages and so the location of the active library will depend on what you have selected from the Tools > Board menu. This is the case with the Wire and SPI libraries.
But grrr.... I found them in my download folder... where I downloaded and extracted the install files. This is usually a sort of scratch folder that I periodically purge as it fills up with old downloads no longer needed. So I either have to maintain the Arduino folder here, or find a way to move it someplace else.
If you have an Arduino AVR Board selected (Uno, Mega, Leonardo, etc.) and you haven't installed a different version via Boards Manager then the hardware package is part of the Arduino IDE installation. You need to move the whole IDE installation, not only the hardware package.
I did a full uninstall of the arduino version that comes with the Pi or you get through apt-get. Then I downloaded the latest version and installed using the install.sh file included in the download.
I'm still getting familiar with the linux environment, where apps are installed, etc., so my apologies if this is kind of a basic question. How do I move the folder and I'm not even sure if the application location is also in the download folder or if it got placed somewhere else during the install.
When you install the Arduino IDE using apt-get you get a super outdated and non-standard version of the IDE. You should always download and install the official and current version of the Arduino IDE from http://www.arduino.cc/en/Main/Software.
Change to the desired directory then extract the arduino IDE files.
# Change to home directory
$ cd
# Extract arduino IDE files assuming the tarball is in ~/Downloads
$ tar xf ~/Downloads/arduino-1.8.4-linux64.tar.xz
$ cd arduino-1.8.4
$ ./arduino
Sketches are stored in ~/Arduino. Downloaded libraries are stored in ~/Arduino/libraries.
Downloaded board files are stored in ~/.arduino15.