Currently, I have an Arduino Mega 2560 and an Ethernet Shield with 6 sensors connected to it. But as this setup is placed in a far place, it is not feasible to upload the data using the USB cable. I was thinking about uploading the sketch through the internet and my research led to this -> How To Upload A Sketch To Your Arduino Via A Network | Freetronics, but I find this approach very complex.
Further, I found the Arduino YUN board, in which uploading the sketch through the internet is supported. But the problem with this is the 2.5 KB SRAM which is less for my sketch.
So I have two questions based on this.
Is there a possibility to use the 16MB of RAM present in Arduino YUN to store and run the sketch?
If not, is there a possibility to connect YUN and Mega as master-slave and use the Mega for the main code and the YUN to upload the sketch to Mega?