Hi guys, The question is mentioned in the title.
Can I hot-swap the Arduino's USB ports?
Actually, I use an I2C module. I found I could get data from the series port. After that, I just unplugged the USB directly. And next time when I connect the USB (also Arduino UNO and sensor module) to the PC. No data appears in the series port. But when I changed to another new Arduino board, the data appears.
In the past, I always did these hot-swap things. But everything goes smoothly.
May i know what should I do after I want to disturb the sensor wokring.
I do not think that will damage the arduino, I do it all the time. However when you remove something or plug something back into the USB the Computer (not the Arduino) re-enumerates the ports. If it comes back with the same number it will probably work, if not it will not work. Something to try, if it does not come back, unplug it, pause for a short time, then plug it back in and see if it runs. Hopefully this helps.
There is the exception and that is if you have a voltage source connected to a pin , and the Arduino is not powered , then it can be damaged .
Clone Arduinos can be especially weak in this area ( I’ve had the CH340 chip fail in a few )