Go Down

Topic: USB gets turned off? (Read 3562 times) previous topic - next topic


Oct 04, 2012, 05:42 pm Last Edit: Oct 04, 2012, 05:46 pm by retrolefty Reason: 1
my problem is that when i hit any of the 3 buttons my ardunio shuts off until i hit the button again.

could anything in my code be causing this or is it a hardware thing?

You have most likely wired up your switches such that when pushed they are shorting out +5vdc to ground. This happens a lot with begineers and those 4 legs SPST pushbuttons which can easily be wired wrong. Two things will help you in the long run. Learn to read and draw electrical schematic drawings that you can post, it is the universal language of electronics and doesn't rely on just english words that can be vague or non-specific when trying to troubleshoot electrical wiring problems. Posting of someone elses wiring scheme does not help us troubleshoot your specific wiring scheme. Second is to obtain and learn to use a multimeter to validate your wiring. No one should be working with arduino construction projects without first obtaining and learning to use a multimeter.

One solution for wiring simple switches to arduino input pins that is short circuit fault proof is to not use +5vdc at all in your switch wiring. Just wire one side of the switch(s) to ground and the other side to the input pins and then enable the pin's internal pull-up resistor. That way there is no way to create short circuits and risk damage. That does not mean that you can't miswire it and the switches not work correctly, but just that there is no potential for circuit damage using that method.


Go Up