Go Down

Topic: Pulling Code From Board (Read 2763 times) previous topic - next topic

Hey all,

I have some projects that I haven't touched in months.  Long story short, I forgot to save the projects when I reformatted my computer, but the Arduinos are programmed with working examples for their respective projects.  Is there a way I can pull the code off of the arduino and edit it again? If that's not possible, can I at least pull the working examples and archive it so I can put the examples back on to the Arduino if I compleltely mess up?

I don't have wiring diagrams of my projects and I'm afraid I won't be able to recreate my working examples if I drop a new program on the Arduino.

Thanks!
Tyler

Coding Badly

The first step is to learn to use AVRDUDE from the command-line.  Experiment on a board that does not have anything precious loaded.

Terry King

Hi Coding,

Hmmm... Could I (maybe with help  :) ) set up a command line that would load the same sketch into any Arduino that I connected to a USB cable??

Maybe helpful "before the class or workshop" ...
Regards, Terry King  ..On the Red Sea at KAUST.edu.sa
terry@yourduino.com  LEARN! DO! (Arduino Boards, Sensors, Parts @ http://yourduino.com

CrossRoads

Lets see,
"forgot to save the projects when I reformatted my computer"
"don't have wiring diagrams of my projects"

If you do manage to get the hex files off the atmegas, do make sure you document what it is you have built up to go with it.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Coding Badly

Hi Terry,

Quote
Could I (maybe with help   ) set up a command line that would load the same sketch into any Arduino that I connected to a USB cable??


So long as the boards are similar, it should work very well.  I think the only issue is processor model (e.g. they all have to be 328s) and clocking (e.g. they all have to use 16 MHz crystals).

The IDE will actually tell you what the command-line is: just hold the shift key when you click upload.  If you preserve the HEX file, you can use it over and over.

Terry King


Hi Terry,

Quote
Could I (maybe with help   ) set up a command line that would load the same sketch into any Arduino that I connected to a USB cable??

...
just hold the shift key when you click upload. 
...


Oh, EVERYBODY knows that.. Oh Yeah! What is there, some secret society of Arduino handshakes and winks??

Thanks for letting me in on one important secret!
Regards, Terry King  ..On the Red Sea at KAUST.edu.sa
terry@yourduino.com  LEARN! DO! (Arduino Boards, Sensors, Parts @ http://yourduino.com

Go Up