I wanted to load a sketch on the SD card for the arduino. Is it possible?
Certainly not a sketch (source code) but the compiled binary (.hex) should be possible. Did you try a Google search for SD Card Bootloader Arduino? It would have pointed you to the "2boots" project which can boot from an SD card.
Not as an .ino sketch but you can uolaod a sketch that will read other sketches from the sd card.
you would need to copy and paste the SD card sketch into notepad or another text editor and save it as .txt.
Then the arduino will read and execute the sketch.txt but the primary sketch saved to board will not change.
I use this technique for some HID mouse and keyboard stuff that i do on android 5.5 in order to farm some games / ad watching surveys that payout a little cash.
So i believe it is possible to read a sketch(.txt) from an sd card and execute the sketch but not program the MC from an sd card.
but i was thinking it might be possible to write a sketch that will program a new sketch.
As in the programmer sketch will be uploaded to ram and the new sketch will be uploaded to flash.
However i can not say for sure it is possible nor can i verify.
a .hex file might be a better and easier solution if my first suggestion doesn't fit your needs.
Not as an .ino sketch but you can uolaod a sketch that will read other sketches from the sd card.
you would need to copy and paste the SD card sketch into notepad or another text editor and save it as .txt.
No that would not work. The text file of the source code can not be executed.
If you have indeed done this then either you are using the wrong words to describe what you have done, or you have a compiler or interpreter running in the Arduino. Something like Bitlash.
Ignore reply #2, only reply #1 and this post is correct here.
I actually wanted to load .HEX files
How could I do that?
isaquearddev:
How could I do that?
See reply #1.
isaquearddev:
I actually wanted to load .HEX files
What do you mean by load?
Is it save it in program memory and then run it? If this is so then you need a bootloader that is capable of doing this as only code in the lower segment of program memory can write into program memory. That is the way the processor is designed.
"Atmega chip stand-alone programmer to upload .hex files"
This is a DIY that you can buy a version of.
http://www.crossroadsfencing.com/BobuinoRev17/Programmer.html