Thread: Switch to OI
View Single Post
  #3   Spotlight this post!  
Unread 10-01-2009, 23:09
whitetiger0990's Avatar
whitetiger0990 whitetiger0990 is offline
Registered User
no team
Team Role: Programmer
 
Join Date: Mar 2006
Rookie Year: 2006
Location: Earth
Posts: 157
whitetiger0990 is a glorious beacon of lightwhitetiger0990 is a glorious beacon of lightwhitetiger0990 is a glorious beacon of lightwhitetiger0990 is a glorious beacon of lightwhitetiger0990 is a glorious beacon of light
Re: Switch to OI

http://www.usfirst.org/uploadedFiles...s-Rev-0-5a.pdf Page 4

Wire the + to the 5V, wire Vcc to ground, wire the other pin to signal.

When it's off, Vcc and signal will be connected, which pulls the value to 0 and will be a false in the code.

When it's on, + and signal will be connected, which makes value 5V and will be a true in the code.

The "resistor" you might have heard of is often including in the innards of the OI. This year's DS does not have one, so all three pins are used (and thus you shouldn't use 2 pin switches on the DS). You can learn about why here: http://en.wikipedia.org/wiki/Pull-down_resistor
__________________
print$q=chr(ord($q)+$1)while("7443-0201-8465130105-12-03135-82482113-06-7672-070208-0613-70"=~/(-?\d\d)/g);

Last edited by whitetiger0990 : 10-01-2009 at 23:12.
Reply With Quote