Go Down

Topic: saving changes to sketches (Read 165 times) previous topic - next topic

brooksdr

On my windows computer, Arduino folders are marked "read only" and apparently that status can't be changed permanently. This prevents saving changes to a sketch. Maybe this is a stupid question, but how do I save changes to a sketch, short of copying it into Notepad, closing the Arduino sketch, and saving the changes on top of the old sketch inside its folder?

UKHeliBob

Where are you trying to save the programs ?

Mine go into C:\Users\Bob\Documents\Arduino which is set in File/Preferences
Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

econjack

From within the IDE and with the code you want to save in the source code window:

1. Press Ctrl-A to highlight the code.
2. Press Ctrl-C to copy the source code to the copy buffer.
3. Press Ctrl-N to create a new source code window
4. Press Ctrl-A to highlight the framework code in the code window
5. Press Delete to remove the framework code.
6. Press Ctrl-C to copy the code from the copy buffer to the source code window
7. Press Ctrl-S to save the code using the file name of your choice.

raschemmel

I came to the conclusion early on that the IDE did not want me to save anything with the same filename so I append a version number at the end of the filename and increment it before every save. Never had any problems since , either with keeping track of changes or telling sketches apart. Sometimes I put an abbreviation at the end of the filename that denotes the change to that version.
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

el_supremo

The Arduino IDE seems to treat "example" sketches within a library as read-only but I've never had a problem overwriting one of my own sketches in the Arduino directory. I also add version numbers on the end of the filename and increment them when I get a new piece of a sketch working.

Pete

brooksdr

OK. The answer I was looking for appears to be the fact that you can't re-save change to sketches when they are saved in the \examples folder. I was putting all my new sketches in that folder. However, this is not a problem for sketches saved in the \arduino folder. Problem solved. Thanks!

D6equj5

Hi,
thank you for this topic - I had the same problem although reading through this, I have now moved "MyWork" to the "Arduino" folder and I can over-write as required when saving.
Good Post
Thanks
D6

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy