Pages: [1]   Go Down
Author Topic: Reading sketch from Arduino  (Read 2094 times)
0 Members and 1 Guest are viewing this topic.
Victoria, BC, Canada
Offline Offline
Newbie
*
Karma: 0
Posts: 10
Learning, learning, always learning.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I've taken over a project without any documentation. I've got no access to the original code, and I'd like to avoid re-writing the whole thing. Is there a way to read the original sketch off an Uno?

I know I wouldn't get clean code, but it would be a starting point.


Thanks...

 
Logged

--
Victoria, BC
48˚ 57'N 123˚ 13'W

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

Hello,

I've taken over a project without any documentation. I've got no access to the original code...

The sort of albatross that can injure a career.

Quote
...and I'd like to avoid re-writing the whole thing.

Warm up your typing fingers...

Quote
Is there a way to read the original sketch off an Uno?

No.  You can read the binary image.  That can be passed through a disassembler.  It will not be at all like the original sketch.  To be useful, you will need to know / learn AVR assembly.

Quote
I know I wouldn't get clean code...

Correct.

Quote
...but it would be a starting point.

Doubtful.
Logged

Victoria, BC, Canada
Offline Offline
Newbie
*
Karma: 0
Posts: 10
Learning, learning, always learning.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You're not being overly helpful, CB. (But you're confirming what I suspected. smiley-razz)

The original physical construction was a nightmare. I suspect the code might be the same. Ah well, the end user is clear about what they want. I think I'll harvest the parts and rebuild.

BTW, here's what they got originally. It took me a day just to map out the relays...

http://flic.kr/p/dSRxe8   and,
http://flic.kr/p/dSRwTx

They actually paid money for this!

Logged

--
Victoria, BC
48˚ 57'N 123˚ 13'W

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

You're not being overly helpful, CB.

Keeping you from what most likely is a fool's errand is not helpful?   smiley-wink

Quote
The original physical construction was a nightmare.

Is that thing in the upper-right corner supposed to be so tarnished-looking?  Did it overheat?  Exposed to corrosive gas?

I wonder how the 7805 in the middle was damaged.  And aren't they supposed to each have two capacitors?

Quote
I think I'll harvest the parts and rebuild.

Were I in your shoes I'd take a different path.  That 7805 is visibly damaged.  There's no telling what the previous handler did to the various parts.

Quote
They actually paid money for this!

Bet they won't make that mistake a second time.
Logged

Victoria, BC, Canada
Offline Offline
Newbie
*
Karma: 0
Posts: 10
Learning, learning, always learning.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Quote
Is that thing in the upper-right corner supposed to be so tarnished-looking?  Did it overheat?  Exposed to corrosive gas?

Actually, it's the only part I'll reuse. It's a Freescale MPX5700 pressure sensor. It's encapsulated in black plastic so it looks bad in the photo. (I should re-phrase... I'll test them and if they're OK, I'll reuse them.)

Quote
I wonder how the 7805 in the middle was damaged.  And aren't they supposed to each have two capacitors?

That would have been wise... The "damage" is intentional, though! As built, there was not quite enough room for the #4 bolt holding the Uno to the other side. Nothing a hacksaw wouldn't fix.

The whole project is a scrum meter for a rugby club. They want to see how various combinations of players put pressure on their opponents. They practice against padded scrum stands that have air cylinders supporting them. The MPX5700's measure the air pressure and I'll use the result to show the peak pressure, and graph the pressure over time on a Processing display.

However it turns out, I'm certain it'll be a thousand percent better than what they had.

Logged

--
Victoria, BC
48˚ 57'N 123˚ 13'W

Victoria, BC, Canada
Offline Offline
Newbie
*
Karma: 0
Posts: 10
Learning, learning, always learning.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

BTW, CB, thanks for your first feedback. I was pretty sure there wasn't any way of getting any meaningful code off the original Uno's. But you never know who's got a miracle solution in their back pocket.  smiley
Logged

--
Victoria, BC
48˚ 57'N 123˚ 13'W

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

BTW, CB, thanks for your first feedback.

You are welcome.

Quote
But you never know who's got a miracle solution in their back pocket.  smiley

If the agreement did not include the phrase "work for hire" then not even a psychopathic lawyer would be able to wrest the source code from the original developer.
Logged

Westbrook, CT
Offline Offline
Full Member
***
Karma: 2
Posts: 139
"Why should I bother with made-up games when there are so many real ones going on." (c) Kurt Vonnegut
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I think that would be pretty hard smiley
Logged

Arduino Uno R3
Mac OSX Lion


Pages: [1]   Go Up
Jump to: