Pages: [1]   Go Down
Author Topic: Upload sketch using another Arduino  (Read 898 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 19
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is it possible to upload a sketch to another arduino using just an arduino?
Logged

Sydney, Australia
Offline Offline
Edison Member
*
Karma: 27
Posts: 1185
Big things come in large packages
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes it is. There is software in the IDE sketch list (or libraries list) call ArduinoISP. If you google this you will find lots of instructions on what to do, includng some YouTube videos.
Logged

Arduino libraries http://arduinocode.codeplex.com
Parola hardware & library http://parola.codeplex.com

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 439
Posts: 23797
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

Nick Gammon has good write up
http://www.gammon.com.au/forum/?id=11635

and from an SD card also ...
http://www.gammon.com.au/forum/?id=11638
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.

Offline Offline
Newbie
*
Karma: 0
Posts: 19
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm actually trying to find a way to upload a sketch from arduino to another arduino chip.  Like have one arduino upload the blink sketch to another arduino chip (so it can blink too) without using the computer
Logged

California
Offline Offline
God Member
*****
Karma: 13
Posts: 629
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm actually trying to find a way to upload a sketch from arduino to another arduino chip.  Like have one arduino upload the blink sketch to another arduino chip (so it can blink too) without using the computer

As CrossRoads pointed, the SD Card hex uploader would be the trick.
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 19
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

But is there a way to do it without an SD card?
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16525
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

But is there a way to do it without an SD card?

Well certainly there is a way if wants to bad enough. A sketch could be written that knows how to 'talk' the ICSP protocol to the standalone chip (like the arduino as ISP sketch) and have the sketch have the desired hex file data written to the flash memory at compile time for export to external device during run time.

I believe someone here wrote a bootloader writer sketch that includes the different bootloader hex file data in the sketch and transfers the proper data when it determines what kind of chip it's attached to. For burning boot-loaders, that was a real cleaver and useful application.

It's a somewhat limited and awkward method to program a chip, but perhaps it fills a real need in some situations?

Lefty
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 439
Posts: 23797
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

See westfw's optiloader sketch
https://github.com/WestfW/
installs bootloader without needing  a PC

video of it in action in reply #7
http://arduino.cc/forum/index.php/topic,68183.0.html

Could be the starting point for uploading sketches vs bootloaders.
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.

Sydney, Australia
Offline Offline
Edison Member
*
Karma: 27
Posts: 1185
Big things come in large packages
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I am curious to know why you want to do this? Looking at creating a self replicating virus?
Logged

Arduino libraries http://arduinocode.codeplex.com
Parola hardware & library http://parola.codeplex.com

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 439
Posts: 23797
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

Virus in an embedded microcontroller? Really?
Hardly self replicating when you have to go around and plug in ICSP cable to load 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.

Sydney, Australia
Offline Offline
Edison Member
*
Karma: 27
Posts: 1185
Big things come in large packages
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yep. smiley

It is a bit of a strange request.
Logged

Arduino libraries http://arduinocode.codeplex.com
Parola hardware & library http://parola.codeplex.com

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 439
Posts: 23797
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

Not really - say you had a bunch of fielded systems that needed revising.
Grab your standalone battery powered programmer and re-load away.
I think having the file on SD card would be more practical, no need to re-burn to your upload tool all the time, just put a new file on the SD card and go.

Maybe put the collection of parts Nick Gammon has working on a little board.
http://www.gammon.com.au/forum/?id=11638

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.

Pages: [1]   Go Up
Jump to: