Pages: [1]   Go Down
Author Topic: is there a way to read data from the device?  (Read 914 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Sr. Member
****
Karma: 0
Posts: 264
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If I have a card , and I don't remember what I have on it- is there a way to know what is on it?

Thanks,
Logged

California
Offline Offline
Faraday Member
**
Karma: 88
Posts: 3384
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If I have a card , and I don't remember what I have on it- is there a way to know what is on it?

Thanks,


Business card? Credit card? Birthday card? Gift card?
Logged

New Jersey
Offline Offline
Faraday Member
**
Karma: 67
Posts: 3702
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Assuming that you mean you've got an Arduino with an unknown sketch on it, the answer is a definite maybe. It is possible (though I don't know the specifics) to read the object code from the arduino. Then you've got to dissasemble it to discern what it's doing i.e. you won't recover the original source code. This would be quite a bit of work, so unless you have a strong reason to need to know what's there, easier to just overwrite it and forget about it.
Logged

Offline Offline
Sr. Member
****
Karma: 0
Posts: 264
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I wrote a code and change it , and before I save the file there was a power-down .
and I didn't remember what I did..............
I will try to write it all from the start...
I thought it would be easier to get the code

Thanks!

and Arrch - if you can't help don't replay.
Logged

Anaheim CA.
Offline Offline
Faraday Member
**
Karma: 47
Posts: 2892
...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think ARRCH Was trying to help, You asked a question about "a Card"? well which? laundry, playing, Get Well?. A Card is a large topic a Very large subject indeed
I wouldn't expect any more had I asked the question, particularly if English wasn't my primary language. I AM Not criticizing you rather the opposite you sentence was fairly well composed, just one word missing. Thus the question.

Doc
Logged

--> WA7EMS <--
“The solution of every problem is another problem.” -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 616
Posts: 49446
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I thought it would be easier to get the code
You can get the hex code produced by the linker. Of course, that won't look anything like the original C++ code that the compiler converted to object files that the linker used as input to produce the hex file.

Quote
and before I save the file there was a power-down
You need to get in the habit of saving first, then uploading.
Logged

Offline Offline
Sr. Member
****
Karma: 0
Posts: 264
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

you are right, but you know -
you only learn the hard way!

thanks,
Logged

Anaheim CA.
Offline Offline
Faraday Member
**
Karma: 47
Posts: 2892
...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

somebody once said that "Pain was the Finest Teacher Usually Never Fails"... Its the ones that read what they understand who make things sticky for those of us that understand what we read... I didn't intend this as anything related to your issue nor as a criticism of any kind, it was a thought about learning in general... one can't see the forest for the trees. I was thinking about how I could see an answer in front of my and just ask why it was so difficult to see.

Doc
Logged

--> WA7EMS <--
“The solution of every problem is another problem.” -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

Finland
Offline Offline
Sr. Member
****
Karma: 1
Posts: 270
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you haven't compiled or uploaded anything since the power break, there is a change that you can find the temporary files that the Arduino used for compiling the hex file. If the temp files are still there, you can salvage the C++ source code you wrote.

On Linux temporary files reside below /tmp/build<something> folder.

Logged

Germany
Offline Offline
Faraday Member
**
Karma: 59
Posts: 3060
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
there is a chance that you can find the temporary files that the Arduino used
Excellent Hint !
 
I noticed under windows, that for every new arduino ( 1.0 ) start there's a new temp directory, so chances are that you even find some old versions, to make life harder for you.

In windows explorer, enter %TEMP% as the directory, to give you a starting point where to search for. It should be something relative to your user account.
Then do a search for files named as your sketch ( without the .ino suffix )  I guess you find some .cpp files
Logged

Leeds, UK
Offline Offline
Edison Member
*
Karma: 80
Posts: 1726
Once the magic blue smoke is released, it won't go back in!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yeah, inside the %temp% folder, there will be lots of other folders, hopefully including ones named: build then random numbers, e.g.:
build213421348092384092384.tmp

I still have some dating back to february so there's a good change you might find one. The .ino files aren't in those folders, but there is the file: YourProjectName.cpp, which is just a copy of what was in the .ino file.
Logged

~Tom~

Pages: [1]   Go Up
Jump to: