Where are downloaded "examples" stored?

I often find examples in downloads of drivers/arduino software/etc.. which I mostly discard but where examples are included which I would like to keep. I notice that often libraries downloaded also contain libraries that are stored with the library folder.

But I am unable to find where I should store examples that I would like to keep without any further "strings attached".

I store my sketches in my D-drive, whereas the Arduino folder is in my C-drive. But I have no idea where to store the folders with downloaded examples.

Can someone please help?

Thks,
Erik

What do you mean 'downloaded examples'? Stuff you copy/pasted or what comes with libraries?
Libs will have example folders and these sketches are read-only. Save modded examples in your usual sketch folder.

And when you have a sketch open, you can open its file location from the IDE menu

INTP:
What do you mean 'downloaded examples'? Stuff you copy/pasted or what comes with libraries?
Libs will have example folders and these sketches are read-only. Save modded examples in your usual sketch folder.

Examples sometimes come with driver downloads. I want to keep the examples but not install the downloaded drivers for example.
What is the standard example location where these may be stored? Can I make a folder in the C-drive where Arduino is located so that they will be included in the IDE example set? Other solutions?

You can store them anywhere you like. The most convenient location may be the sketchbook folder. Sketches in that location will be accessible via the File > Sketchbook menu.

brice3010:
Can I make a folder in the C-drive where Arduino is located so that they will be included in the IDE example set?

That's a bad idea because you will lose all the examples you've added to that location anytime you update to a new version of the Arduino IDE. If you're set on having them show up in the File > Examples menu then you should create a dummy library at {sketchbook}/libraries and put the examples in the examples subfolder of that dummy library. You just need to add a blank .h file in the dummy library's root folder to make it be recognized by the Arduino IDE.

Examples that rely on having particular libraries installed, are pretty pointless without having those libraries installed.

But whatever your motivation for doing this, just copy those ino files and put them wherever your other sketches are, then delete the library folder.

INTP: you have a point. I just want to know how the Arduino IDE recognises where an example folder is; if it were possible I would reorganise the examples of all those libraries in one singel folder. But maybe this is a pointless exercise?

pert: what do you mean with “{sketchbook}/libraries”? Does the folder have to be named “libraries” wherre the examples are stored? Can it be anywhere (I would no longer store them in the C-drive with Arduino) in the D-drive, or in Google Drive?

“blank .h file”: I downloaded these Digistump drivers and the folder comes with its own example folder; no library in there, no .h file, yet the examples show up when I open the Arduino IDE. How does that work?

brice3010:
pert: what do you mean with "{sketchbook}/libraries"?

Sketchbook folder location can be found/changed at File > Preferences > Sketchbook location. Libraries are installed in the libraries subfolder of the sketchbook folder.

brice3010:
Does the folder have to be named "libraries" wherre the examples are stored? Can it be anywhere

If you want the example sketches to show up in the File > Examples menu then they need to be located either in the examples subfolder of the Arduino IDE installation folder(which, as I already said, is a bad place to put your own examples) or in the examples folder of a library installed in one of the libraries folders recognized by the Arduino IDE. The only logical one of these libraries folders to use for your purpose is {sketchbook}/libraries because the other locations would be overwritten on an IDE or hardware platform update. If you don't care about your example sketches showing up in the File > Examples menu then you can put them anywhere you like.

brice3010:
"blank .h file": I downloaded these Digistump drivers and the folder comes with its own example folder; no library in there, no .h file, yet the examples show up when I open the Arduino IDE. How does that work?

Please post a link to where you downloaded the "Digistump drivers" from.

Pert, thank you for your explanation and your patience!
The Digistump url I have to look up and will post when I find it, later today; I have been having so much trouble with the digistump on my pc (Win7 64bit), the device keeping not being recognized ("Unknown Device) that I am about nuts on this issue.

pert:
Please post a link to where you downloaded the "Digistump drivers" from.

Just stumbled across it in my browser history: http://www.14core.com/installing-digispark-micro-size-attiny-usb-development-board/

brice3010:
Just stumbled across it in my browser history: http://www.14core.com/installing-digispark-micro-size-attiny-usb-development-board/

I don't want to run that installer because I don't know exactly what it's going to do but I suspect it just puts the examples in the Arduino IDE folder. That thing is years outdated and i wouldn't recommend using it unless you are using an old Arduino IDE version. There is a much better way to install 3rd party hardware support in the Arduino IDE now, Boards Manager. Digistump has moved to this new system as well as ditched SourceForge(yuck!) for GitHub:

As you can see, they now use the dummy library solutionfor their examples:

In fact, it turns out I was the one who did that for them, even though I had since forgotten it.

Hi pert, thank you for this information.

Actually I am getting "Unknown Device" errors that I cannot solve at the moment (http://digistump.com/board/index.php/topic,2479.15.html) on a Win7 64bit machine;

Two other machines (Win7 64bit and Win8.1 64bit) pose no problems, but this particular machine is my workhorse and I really need a solution to get the Digisparks to read on this one.

I would very much appreciate it if you might be able to shed some light on it; I might have to move this discussion to a different thread since I am digressing from the subject. I await your suggestions.

Thks
Erik

pert:
In fact, it turns out I was the one who did that for them, even though I had since forgotten it.

I don't have any experience with the DigiStump but it sounds like you need to install the driver on that computer.

pert:
I don't have any experience with the DigiStump but it sounds like you need to install the driver on that computer.

I did. But I am digressing from the subject.

pert, thks for the useful insights you gave me. I finally think I will upload the sketch folder including the included libraries folder to Google Drive: this way I can amuse myself anywhere on any configured computer with my projects.

By default, the examples are part of the library installations.
If I install the adafruit Neopixel library (using the library manager), it will create a directory:
/libraries/Adafruit_NeoPixel/
and in there is a /libraries/Adafruit_NeoPixel/examples subdirectory that contains the examples for that library. So I don’t think there is a good way to install examples without installing the library as well.
(there is also the IDE install examples directory, which contains examples that aren’t associated with a library, but that’s specifically what you DON’T want to do, right?)
I suppose that you could create a phony library sketchbook/libraries/ophanedExamples that doesn’t actually contain any code, and copy all the examples sketches (which are directories) into sketchbook/libraries/ophanedExamples/examples…
Or you can just create a “examples” subdirectory in your personal sketch directory and copy examples there; but you’d have to access them via the normal “open” or “sketchbook” paths rather than the examples menu.

I already abandoned the idea of organising on my own the examples.

Your arguments are convincing :wink:

Erik

The digispark board has a very particular method for uploading, I suggest you watch a few youtube videos carefully. There was literally a short segment during a longer video that held the key for me to get it working.
Windows recognizes the board briefly then disconnects it, there's a process you need to work through. Then uploading is such that you have it unplugged, click upload, then it will prompt you to plug it in. The videos are thorough and not worth transcribing for you. Do a little searching on Youtube.

brice3010:
"blank .h file": I downloaded these Digistump drivers and the folder comes with its own example folder; no library in there, no .h file, yet the examples show up when I open the Arduino IDE. How does that work?

As I said before, you can just open any of the example sketches, use the menu bar on top
Sketch>>Show Sketch Folder

You will see where the sketch is kept. If you downloaded the drivers by putting an URL into File>>Preferences>>Board Manager URLS then the IDE does all the housekeeping.

INTP:
The digispark board has a very particular method for uploading, I suggest you watch a few youtube videos carefully. There was literally a short segment during a longer video that held the key for me to get it working.
Windows recognizes the board briefly then disconnects it, there’s a process you need to work through. Then uploading is such that you have it unplugged, click upload, then it will prompt you to plug it in. The videos are thorough and not worth transcribing for you. Do a little searching on Youtube.

Tell me, I know all about it by know, three days and sleepless nights; talking about Murphy, I had driver issues with other devices sending me all over the place looking for the root cause. I finally fixed it: a Intel 3.0 USB Main Hub driver missing causing “Unknow Device” too. Never ever try to install Digistump when the Device Manager is not clean as a virgin :).

I installed sketches from the library manager but I can’t find them. The sketch menu does not have import library but only included library. And where is the radar sketch. Do I add one sketch to another. As difficult this is proving to be, it’s way simpler than writing code for the stamp