Burn sketch using 2 arduinos, EEPROM, I2C...

Hello forum,

I tried out Nick Gammons hex-uploader and the board-programmer (http://www.gammon.com.au/forum/?id=11638) and I am happy: it works fantastic.

Now i need further help...

I want to use an uno as programmer and a mega 2560 as target.
The blink.hex is on an I2C EEPROM that the mega is connected to as master and the uno as slave.
The procedure should be as follows:

  1. mega (master) writes blink.hex to EEPROM via I2C (source may be SD or ftp, etc.)
  2. uno (slave) checks on start if blink.hex is on EEPROM
  3. uno (slave) reads blink.hex from EEPROM via I2C
  4. uno (programmer) burns blink.hex to mega (target)
  5. uno (programmer) resets mega (target)
  6. mega (master) starts up and clears EEPROM on success

if the EEPROM is empty the uno just does nothing after reset

Sounds a little complicated, but I did not find any working solution to update a sketch with no computer connected. maybe someone can help.

Many thanks in advance,

jmF

Sounds a lot like my bootloader programmer:

That uploads a bootloader stored in the PROGMEM of the uploader. Now to upload a sketch instead would be a slight change to the address it uploads to.