Hello, I have an issue where I have multiple Arduino's, all of which only run for half a second or so when powered over USB from my pc. I have an Arduino UNO and two Arduino Megas, and they have all done this since I purchased them. When I connect the USB and upload ANY code, it will run for maybe 500ms, and then shut off. When I press the reset button, it will continue to do the same thing again. The RX light will flash twice after the code has run for a short period of time before stopping. When I power with the power adapters, they will run, but the issue is that I'm not able to troubleshoot or run a serial monitor when connected to my pc. I have made sure all drivers are updated, they all have individual COM ports assigned. Occasionally when uploading the code, it will give a random upload error, stating it cannot connect to the board, but when I upload one or two more times it will work. This seems to be a transmission of data issue, but I cannot find any other information on this.
Also, I have tried two different PCs and both have the same issue. I have also purchased a USB hub that is powered, assuming the PCs arent providing enough power over USB and it still doesn't work.