I am currently working on a school-project where I am looking to make a user-friendly experience towards coding a little robot. The robot will have an Uno WiFi R3 module from Robotdyn. It's basically a Uno with an ESP in it.
I have the system all set up, the userexperience is functional and as should, and I now come to the point where I send a request to the ESP containing an array of the parsed code. I now want that code to be uploaded to the arduino-part of the Uno Wifi R3. I specifically don't want it to run on the ESP as that will be hosting the code that connects to the server in order to receive the post-requests.
I can't get too deep into the method of how we get the code to the ESP, but it's there. How can I forward that to the uno and flash it on there?
Actual AVR binary code, or some sort of interpretted higher-level code?
For the former, the ESP would have to interact with the AVR bootloader and/or ISP pins, which would be heavily dependent on exactly how they're connected - check for any documentation from robotdyn on "over the air updates." Or perhaps you could include an updater in the AVR code, based on some of the modified optiboots around.
For the later, you might get away with storing small "programs" in the EEPROM of the AVR.