Hello,
I would like my arduino go to a website and download the compiled sketch and upgrade the internal program, without me connecting it to the PC. What do you suggest? I searched online and found only how to upgrade the bootloader.
Hello,
I would like my arduino go to a website and download the compiled sketch and upgrade the internal program, without me connecting it to the PC. What do you suggest? I searched online and found only how to upgrade the bootloader.
That seems like a difficult project. Will you be providing the image yourself and arranging for it to be hosted somewhere? I think there are two possible approaches. One is to use an SD card or similar as storage and write a sketch which will download the image and save it to SD, then write a bootloader which will copy it from SD to program memory. The other is to use a piggyback arrangement where one Arduino downloads the sketch and then programs another Arduino via ICSP. Both approaches are feasible and I think Nick Gammon has probably got examples showing how to go about them, but they are both advanced projects.
Do you actually need to update the whole sketch? Depending what you're trying to achieve, it may be possible to implement your solution as a Bitlash script and only update the script, rather than the whole sketch. In that case you wouldn't actually need to mess around with bootloaders and program memory at all - just download and save the script.
The other is to use a piggyback arrangement where one Arduino downloads the sketch and then programs another Arduino via ICSP.
IIRC such a way of working has been done (or at least proposed) a few years ago on the old forum.
Seams feasable to me, use an SD card to store the image before uploading.
void loop()
{
if (some trigger e.g. RTC)
{
result = downloadToSDcard("your URL", fname);
...
result = uploadToBoard(fname);
...
}
}
Thank you for the replies,
I have been searching online and found that the arduino does not have enough power because I need an SSL connection and the arduino can not run SSL. I am looking for alternatives where I can run linux.
I am checking the beaglebone as an alternative, I would appreciate any suggestion.