I am confused how the IDE file system works

Full disclosure, I am completely new to the Arduino, and literally bought it to play with and try to figure out. It's slow going.

My first question on the forum was regarding powering a servo, and I learned I needed a separate power supply. Finally got that figured out and it works good I think.

One thing is driving me nuts: I expect the IDE to save files like windows, and it doesn't seem to.

When I try to save a 'sketch', it creates a new folder with the name I specified, and then the sketch is in that folder with a name it made. (not in the folder that I intended to save it).

Also, when I try to 'save as', it opens up the program in a new window and it won't compile.

Finally, (not related to filing) I have seen a program in a CNC post processor that had some kind of 'step' feature, where it goes line by line and shows how the program runs. Can you do that in this IDE?

Hi @james23. What you need to understand is that the folder is the sketch. Since many common Arduino sketches contain only a single .ino file, it is easy to get the impression that the .ino file is the sketch. However, an Arduino sketch may consist of multiple files (some complex sketches have hundreds of files). All the files in the sketch folder make up the sketch program, so it is important for each sketch to have its own dedicated folder.

Sure, but you can put the sketch folder under the folder you want to store it under.

You can do it with specific boards in Arduino IDE 2.x. You can learn about that here:

1 Like

Which version of Arduino IDE are you using (e.g., "2.0.1")? The version is shown on the window title bar and also in the Help > About dialog.

I ask for this information because I want to give you the appropriate instructions for the IDE version you are using.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.