View Single Post
  #15   Spotlight this post!  
Unread 10-03-2008, 16:38
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Using Analog Inputs as Digital (on the OI)

Quote:
Originally Posted by sumadin View Post
Hmm. I'm just about to wire the switch, and I'm wondering if I really need a connection to ground. Shouldn't I just be able to wire: +5 aux -> 10k resistor -> switch -> analog input, all in series?
You've got it right. An open circuit will be read as 127, and with the switch closed you should see something like 230. No ground connection is needed (or wanted -- it could trigger the open-circuit detector and be read as 127 too).