Help with MAC OS and libraries please....

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
NM_Fruitcakes
 
Posts: 5
Joined: Mon Jun 25, 2012 11:52 pm

Help with MAC OS and libraries please....

Post by NM_Fruitcakes »

So my daughter is attempting to recreate my success with the RGB_LCD board.

She currently has the RGB LCD Library folder that the RGB_LCD file requires under the contents/resources/java/hardware/libraries folder.

Trying to compile this sketch yeilds a bunch of errors.

First, in an orange box above all the error messages : "Adafruit_RGBLCDSHIELD does not name a type"

Then the errors start :

HelloWorld.pde:-1: error: 'Adafruit_RGBLCDShield' does not name a type
HelloWorld.cpp: In function 'void setup()':
HelloWorld.pde:-1: error: 'lcd' was not declared in this scope
HelloWorld.cpp: In function 'void loop()':
HelloWorld.pde:-1: error: 'lcd' was not declared in this scope
HelloWorld.pde:-1: error: 'BUTTON_UP' was not declared in this scope
HelloWorld.pde:-1: error: 'BUTTON_DOWN' was not declared in this scope
HelloWorld.pde:-1: error: 'BUTTON_LEFT' was not declared in this scope
HelloWorld.pde:-1: error: 'BUTTON_RIGHT' was not declared in this scope
HelloWorld.pde:-1: error: 'BUTTON_SELECT' was not declared in this scope

I'm guessing that the libraries are still not set up correctly. I did some searching around, and found a post that a user with a MAC had to have the libraries posted in /Users/username/Documents/Arduino/Libraries as well.

Questions:

Am I correct in thinking this is a library error?

If the sketch is in the library, she can not find it using the IDE to open the file. Where should the sketch reside? Does it matter if it is outside of the library?

Her installation does not have this directory structure : /Users/username/Documents/Arduino/Libraries should she manually create it?

Her "Blink" sketch example works.

Arrrgggghhhh!!!! This is why I will forever be a PC person.

Thanks for any help!

stephanie
 
Posts: 295
Joined: Sat Dec 11, 2010 1:17 am

Re: Help with MAC OS and libraries please....

Post by stephanie »

Assuming you are on the latest (1.0.1) version of the Arduino IDE, the default setup will create your sketches in the following folder:
~/Documents/Arduino

For the libraries that you add (eg. anything that didn't come built in with Arduino) you should create a libraries folder in the above folder,and then add the libraries in there. So the RGB library would be:
~/Documents/Arduino/libraries/Adafruit_RGBLCDShield

(If you aren't familiar the ~ character means the user's main directory, which would be /Users/yourname )

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”