I got an arduino that I need to return to my teacher but the code on it holds sentimental value to me, my pc crashed recently so I lost the code, is there any way I can transfer the code from this arduino to my new arduino
You can apparently dump flash memory to a file using avrdude. Of course, that is only the executable machine code of your sketch. You've lost the nice C/C++.
I've not done it but here are some examples: Google
Then you'll need to alter the paths to avrdude(.exe) and avrdude.conf to suit your setup, along with the COM port you're using.
Click on the batch file, and the hex file will be saved in the current folder.
To write the *.hex file to another UNO, paste this into a *.bat file, (I named mine "WriteUNO.bat"):-
GerbenxB:
Yes, talking about an Arduino Uno and Windows 10 as OS
Is it 64-bit?
If so, your installation is probably identical to mine, so you'll probably only need to change the COM port.
(I'm using Windows 10 Pro 64-bit.)
If you have Win10 32-bit, you'll need to change the paths a little to suit. Before digging in too deep, just remove " (x86)" from the "Program Files" bit, and change the COM port part, of course.
If you have a problem, you might need to dig in and double-check the exact path to avrdude.exe and avrdude.conf.
Edit: Or there's CrossRoad's suggestion.
ATMega328P chips are cheap. Mind you, copying the code and writing it to the new UNO is cheaper still.
I got an arduino that I need to return to my teacher but the code on it holds sentimental value to me, my pc crashed recently so I lost the code, is there any way I can transfer the code from this arduino to my new arduino
Where did you store the backup copy of your code? Did you burn a copy on a data CD? Or copied it to a memory stick?
Just restore the code from where you stored a backup!
In case you have no backup, the code has not been worth copying in the past, so it is worthless to think about now.
Always store a copy of all your important programs and data on your USB key or in the
cloud or somewhere!
Just because a machine crashed doesn't mean you give up - there are sometimes chances
to recovering data from a disk - pop the disc in a USB drive caddy and try a recovery utility.
OldSteve:
Is it 64-bit?
If so, your installation is probably identical to mine, so you'll probably only need to change the COM port.
(I'm using Windows 10 Pro 64-bit.)
If you have Win10 32-bit, you'll need to change the paths a little to suit. Before digging in too deep, just remove " (x86)" from the "Program Files" bit, and change the COM port part, of course.
If you have a problem, you might need to dig in and double-check the exact path to avrdude.exe and avrdude.conf.
Edit: Or there's CrossRoad's suggestion.
ATMega328P chips are cheap. Mind you, copying the code and writing it to the new UNO is cheaper still.
Yeah I guess it is identical to yours, I will try to copy it Friday. and I'll let you know on here if I have more questions/problems, thanks for the reply and others too
jurs:
Where did you store the backup copy of your code? Did you burn a copy on a data CD? Or copied it to a memory stick?
Just restore the code from where you stored a backup!
In case you have no backup, the code has not been worth copying in the past, so it is worthless to think about now.
Well it holds great sentimental value to me because it is my first project that I made, the start of my programming :), and I never thought my pc would crash, I just didn't think of it.