Pages: 1 [2]   Go Down
Author Topic: USB gets turned off?  (Read 1254 times)
0 Members and 1 Guest are viewing this topic.
Left Coast, CA (USA)
Offline Offline
Brattain Member
Karma: 361
Posts: 17301
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

« Last Edit: October 04, 2012, 10:46:23 am by retrolefty » Logged

Pages: 1 [2]   Go Up
Jump to: