Help with #Include on a MAC... please?

Im SO new to this… I don’t even have a board yet! Hoping it is in the post.

Anyway, getting ready for it, I am having a play with some code in the emulator, ready for when it turns up. I am a compliant programmer, been programming in C, CB, Java for about 10 years.

But THIS time round, I am trying to use my MAC for programming, rather than my PC. Very brave of me…
I use a PC everyday and I bloody HATE them… Macs are the way to go. ;D

So instead of messing with Bootcamp or Parallels, I thought id use the MAC IDE.

Everything seems to work, but I can’t seem to get the include to work :frowning:

I installed the IDE by just dropping it into the APP folder. And installed the FTDI drivers for Intel Macs in the default location.

I just CAN’T work out where the heck I need to drop the .h files for including!

There are no “hardware” or “libraries” folders on my Mac.

Do I have to add them? Where do I put them?

Can anyone help with this VERY easy problem? :-[

23 reads… no replies…

You all PC users? :-X

OK I am a Mac user but I am at work and we have PC here. I can’t quite remember because I don’t use libraries much but.
Inside the Arduino folder that is created in documents there is a folder called library you are supposed to put them in there.

However you can also sneak them in inside the application. Select it and chose the “show package contents” option. There you can navigate down to a folder called hardware that contains the standard "built in " library files. You can also put them in there but you are not “supposed” to.

Thanks Mike… I know that feeling… damn PC’s!

Can’t see a “library” folder in my MacHD/Users/Me/Documents/Arduino folder…

Have I screwed the install up? I though I would just run the app…?

I will create one and see if I can get it running that way…

Don’t suppose you could have a quick look if you get time when you get back to your lovely Mac tonight? :wink:

on a windows install if you put a .h file in the same folder as the .pde for the sketch it will show up as a tab in the ide and you can #include it. I don’t see the mac being different.

In version 0017, the hardware directory is getting buried underneath stuff in
…/Arduino17.app/Contents/Resources/Java/hardware/
and libraries is just below that in
…/Arduino17.app/Contents/Resources/Java/hardware/libraries

(I dunno why. Sure makes it hard to get to. Sure, they’re “resources”, but they’re essentially shared resources with user level apps, and source code, and such, and they shouldn’t be hidden “inside” the app like this.) 0017 started putting the tmp directory for object files (when you “verify” rather than “upload”) in weird places too. Probably a consequence of keeping up with “Processing.”

That said, which .h files are you talking about? The ones needed by the normal Arduino environment, or for that matter by the surrounding avr-gcc environment, are in appropriate places and get found via explicit search paths specified when the arduino IDE runs the compiler, and “personal” .h files should usually go in the folder with the .pde file…

In IDE 17 on my MAC I find a folder called Arduino in Documents. I then had to create a folder called libraries and put all of my libraries in it.

Hope that helps

I had the same problem - not finding the right directory on the Mac.

Resolved the problem like this:

I created a new folder ‘libraries’ under
‘/Users//Documents/Arduino’
and put the downloaded libraries (folders) in it.

After restarting the Arduino IDE 0017 the libraries are available to include in the sketch via the menu Sketch / Import Library.

Works fine … but I did not find it documented.

J.M.

Thanks for all the help guys…

Followed your instructions…

Does that mean I have a DIFFERENT error then?

::slight_smile:

The message says that A does not define a type in screenUpdate, so you show a screenshot that just shows the first 3 lines of the function, and you’d like for us to guess at the cause of the problem.

Did I miss something?

School boy error!

Thank for all the replies everyone…

Looks like the include is now working… did a little looking about and there were some syntax issues with my “if” statements

Sorted and running now. Just gotta wait for the damn hardware to turn up now! Hope it will be tomorrow. ;D

Thank you all VERY much for your help! :sunglasses: