Can you put a switch in a USB cable?

I do a lot of plugging and un-plugging the same Arduino board over and over. Has anyone ever put a switch in a USB cable so I can just flip a switch instead of un-plugging and re-plugging the cable every time I want to stop and edit code.

Is that even something you can do?

Yes, you can even buy them made up with a plug at one end of the cable and a socket at the other

https://www.amazon.co.uk/Adafruit-USB-Cable-with-Switch/dp/B00KAE3F58

1 Like

Or make one of your own using:-
My USB power switch layout
USB power switch

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.