Pages: [1]   Go Down
Author Topic: Pulling Code From Board  (Read 2581 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 200
Posts: 12773
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Red Sea, Saudi Arabia
Offline Offline
God Member
*****
Karma: 12
Posts: 579
..On The Red Sea
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Coding,

Hmmm... Could I (maybe with help  smiley ) 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" ...
Logged

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

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 524
Posts: 26484
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 200
Posts: 12773
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Red Sea, Saudi Arabia
Offline Offline
God Member
*****
Karma: 12
Posts: 579
..On The Red Sea
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

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

Pages: [1]   Go Up
Jump to: