user19505: How to remove the program from arduino board which is already there in it.?And I need that program in my arduino IDE how to take it please help me?

user521: You can't. The program in the Arduino IDE is compiled to machine code (bits and bytes basically) and that's what is uploaded to the Arduino.

user4143: It's a bit like baking a cake. Or brewing cider. Once you have baked your cake can you get the eggs, flour and sugar back again? Can you make apples from cider? No. And it's the same with compiling. Once you have compiled your source code you can't turn it back into source code again.

user7508: You can retrieve the program currently in your Arduino with the
avrdude tool. This tool comes with the Arduino installation. The way
to call it is somewhat OS-dependent. On Ubuntu, for an Arduino Uno, I
type:
avrdude -p atmega328p -c arduino -P /dev/ttyACM0 -b 115200 -D -U flash:r:prog.hex:i

This creates the file prog.hex with your program in Intel
HEX format. You can save this
file if you want to re-install it on the Arduino later. You can also
turn this file into an assembly listing with avr-objdump:
avr-objdump -m avr -Dz prog.hex > prog.lst

You may be able to make some sense of this listing if

you are well versed in AVR assembly language
you have lots of spare time

As others have said, you cannot expect to get the original C++ source
back.

19505: <p>How to remove the program from arduino board which is already there in it.?And I need that program in my arduino IDE how to take it please help me?</p>
 521: <p>You can't. The program in the Arduino IDE is compiled to machine code (bits and bytes basically) and that's what is uploaded to the Arduino.</p>
 4143: <p>It's a bit like baking a cake. Or brewing cider. Once you have baked your cake can you get the eggs, flour and sugar back again? Can you make apples from cider? No. And it's the same with compiling. Once you have compiled your source code you can't turn it back into source code again.</p>
 7508: <p>You can retrieve the program currently in your Arduino with the
<code>avrdude</code> tool. This tool comes with the Arduino installation. The way
to call it is somewhat OS-dependent. On Ubuntu, for an Arduino Uno, I
type:</p>

<pre><code>avrdude -p atmega328p -c arduino -P /dev/ttyACM0 -b 115200 -D -U flash:r:prog.hex:i
</code></pre>

<p>This creates the file <code>prog.hex</code> with your program in <a href="https://en.wikipedia.org/wiki/Intel_HEX" rel="nofollow">Intel
HEX</a> format. You can save this
file if you want to re-install it on the Arduino later. You can also
turn this file into an assembly listing with <code>avr-objdump</code>:</p>

<pre><code>avr-objdump -m avr -Dz prog.hex &gt; prog.lst
</code></pre>

<p>You may be able to make some sense of this listing if</p>

<ol>
<li>you are well versed in AVR assembly language</li>
<li>you have lots of spare time</li>
</ol>

<p>As others have said, you cannot expect to get the original C++ source
back.</p>
