Remote Update OCS Sketch

Fernando Nino Sr

Lots of reading on OTA or using alamode, lots of confusion. So I when back to step one, how to update my sketch to the OCS Arduino mega2560 with what I have around the observatory.
1. I already am using RPi4 with Stellarmate, and I installed the Arduino IDE. So I can download update OCS sketches using VNC.  Well that is one option but presents several questions.
a. will I be able to keep the usb plug inserted into the Mega and use it only when uploading the sketch?
b. Arduino is powered via 5v external power supply due to I have it running 24/7.
c. will having both plugged in do any damage? I have googled the subject and it comes to "whether the chicken or the egg came first". There are so many different answers on this subject. Ok, so I found somewhat of an answer from the website.  Open Electronics , they claim that "Therefore it is clear that if you apply the voltage to the USB port and an external source to the JACK socket at the same time, it will be this last one to power the circuit, while the USB connection will keep working for the data exchange with the computer and no longer as a power source. We remind that in both cases the 5 V socket cannot be used as input, but only as output."

Then I was thinking, maybe I can use a relay to turn on/off the OCS Arduino while I use the USB connection to upload the sketch, but the usb cable would still be in place when I get done uploading the sketch. So when I turn the OCS back on will there be a issue with the cable still plugged into the RPI4?
How about direct connection using intranet to upload sketch, or somehow make the OCS into a hotspot just to upload the sketch via wifi.
Comments, Ideas or Thoughts,  anybody?

Join to automatically receive all group messages.