directory structure - I give up

Hi folks.

Yes I am new. In fact this is a real "Feet first" job for me. I have NO C knowledge of structures, but have done some programming in BASIC and a language called AREXX - which is supposed to be similar to REXX.

(tangent - sorry I bought my Arduino board from a shop - it was made by freetronics - and downloaded the software. (Oh, the board was an Etherten but when I plug it into the computer it is called Eleven - go figure.) I got the drivers working, finally, and the board does work. I have done a couple of uploads with BLINK or FLASH. The LED blinks and I can change how it does it. So no problems there. end of tangent)

Anyway: The software installed itself on C:\program files\arduino-1.0 Note the -1.0 suffix. And it was mentined somewhere to put all the other files in "my documents\arduino" Ok, that's easy enough to understand.

But in the -1.0 directory there is a LIBRARIES directory. I can maybe accept that "they" didn't make the "my documents\arduino\libraries" directory, but I won't go any further with that.

When I download SKETCHES do they go in the -1.0\SKETCHES directory, or the My documents\arduino\sketches directory? Same with libraries: Where do they go?

I have downloaded the libraries needed for a sketch and put them in the wrong place. Thus this post. When I compile I am getting a lot of errors. But not wanting to dump everything here and make a bigger fool of myself than I need to, I would like to ask if someone can help me get the layout of what goes where resolved so then I can see the real errors and not the ones caused by incorrect paths.

Yes, I have read the instructions about going and reading a bit about C programming to help with SYNTAX, but I am stuck with what to ask "Mr Google" to do with path structures.

Thanks in advance.

Make a test sketch in the IDE. Put whatever you like in it, eg.

// test

Save it. Then find it using Windows. That will tell you where the sketches folder is.

Say you called the sketch "foo". You will have a foo.ino file inside a "foo" folder. The "foo" folder is in the sketches folder. That is where the "libraries" folder goes. (Not inside foo, adjacent to it). Put new libraries into the libraries folder (ie. a directory per library).

In the Arduino IDE, click on File -> Preferences, look at the "Sketchbook location:" at the top. It will look something similar to this (C:\Users\admin\Documents\Arduino) Inside that directory is where you put your libraries folder, and inside that libraries folder is where you put new libraries. So in the example case above, your libraries folder would go in C:\Users\admin\Documents\Arduino\LIBRARIES. The libraries directory under the Arduino-1.0 is NOT where you put new libraries.

C:\Program Files\Arduino ← That’s your distribution folder. No user-serviceable parts inside (unless you know what you’re doing.)

C:\Users\You\Documents\Arduino ← This is where you live.

C:\Users\You\Documents\Arduino\libraries ← Aftermarket parts
C:\Users\You\Documents\Arduino\sketches ← Your sketchbook

Thanks guys/folks.

I hope I am getting closer now.

Here is a piccie of my directory structure.
NOTE: I have set the IDE program to point to the ARDUINO directory in “my documents”.

Indulge my “mixing things up a bit” but here is my breakdown of the screen grab:
My documents\arduino is where things point from the IDE’s settings.
In there I have a LIBRARIES directory - excuse the one pointed to just now.
I also have a SKETCHBOOKS directory - see black line
In the SKETCHBOOKS directory I have other directories with sketches in them.
The one in which I am working is the alarmclock one.
Now, when I load ANY sketch, I get this error, highlited by the 3 grouped arrows showing the library name, location and the error I am getting.

That doesn't look right in the sense that you seem to have the supplied examples there.

But for the moment, the error about the library name is suggesting that you can't have hyphens in the name. That looks like a Git branch code in hex. Just rename the library to get rid of the "-xxxxxxxxxxx" part at the back.

Try renaming the folder to arduino_osc.


(Well I hope)

Something magical happened and I can now compile the sketches.

Thanks to all who helped.

No offence but I think I was thrown off course with one of the sketches which told me where to put the files and the paths were specific to THEIR machine.

You also appear to have libraries within libraries. You should have:

Docs \ Arduino \ Libraries \ arduino_osc Docs \ Arduino \ Libraries \ Ethernet Docs \ Arduino \ Libraries \ String

They should not be nested.

You also appear to have libraries within libraries. You should have:

Docs \ Arduino \ Libraries \ arduino_osc Docs \ Arduino \ Libraries \ Ethernet Docs \ Arduino \ Libraries \ String

They should not be nested.

Thanks for that.

I am showing my ignorance.

What is/was going on was I would download a library and extract it as was.

The actual file was probably nested and I simply moved it to my "libraries" directory.

I'll try to get that looked at.

Just now I am having problems with the FREETRONICS 16x2 display and getting the datasheet. Their PDF seems corrupt, and I am trying to learn how to use it for the sake of an exercise.

Anyway, I'm babbeling now. I shall try to get the libraries sorted out ASAP.