Pages: [1]   Go Down
Author Topic: Sketch Filenames  (Read 319 times)
0 Members and 1 Guest are viewing this topic.
Coppell, Texas
Offline Offline
Newbie
*
Karma: 0
Posts: 34
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

When I create a new sketch and save it, I create a new folder then save the sketch in that folder.  If I make
any change to the sketch and "save as" to give it a new name (such as including a version # in the filename)
the IDE will not let me save the renamed sketch in the same folder.  It forces me to create a new folder.
Can this behavior be changed.  I would like to be able to save the sketch(s), the latest and prior versions,
in the same folder.
Logged

0
Offline Offline
Shannon Member
****
Karma: 132
Posts: 10494
:(){:|:&};:
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

no, main sketch and folder HAVE to have the same name, because of the way the editor handle the file to compile your code.

But you can have multiple file with different name: they are show as a tab. So your main file can include and call setup and loop of your "versioned" tab. you can also use a litte bit of Class magic to automagic change main file without changin nothing but include and assignemt (you should know how an abstract class work, and create abstact setup and loop, and use this abstract calss in all your "subfile")
Logged

sei nuovo? non sai da dove partire? leggi qui: http://playground.arduino.cc/Italiano/Newbie

Pages: [1]   Go Up
Jump to: