Shop OBEX P1 Docs P2 Docs Learn Events
switches only work "when the want to" — Parallax Forums

switches only work "when the want to"

epicjr77epicjr77 Posts: 29
edited 2008-06-17 19:45 in BASIC Stamp
Hello I have two random switches that I found and I am using a 220 and a 10k ohm resistor set up, for some reason the program only reads them every so often, when i run a led to the switch if turns on and off every time with the switch. I am using a BS2, does anyone have any ideas for trouble shooting? Thanks

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-06-17 19:44
    Without providing a schematic of your connections there will be little anyone can offer for assistance. A clear diagram would be a good start.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • Mike GreenMike Green Posts: 23,101
    edited 2008-06-17 19:45
    You need to post a diagram of exactly what you've put together. The fact that an LED works when controlled by the switch doesn't guarantee that it would work in some other circuit. The switch contacts may be partially worn out or corroded and the LED draws enough current (10-20mA?) to "burn off" an insulating layer. A 10K pullup only draws 500uA if that's what you've got.
Sign In or Register to comment.