I've got an Arduino Uno, and I want it to be able to read the state of a 12v "Illuminated Switch" in a way that allows the switch to properly illuminate. I have an external 12v, 1.5A power supply that I can use to light up the switch. The switch is listed as SPST, but has three connectors on it, due to the built-in LED and resistor. The three connections are POWER, ACC, and GND, and the first two short when the switch is closed.
The Arduino has a digital input mode called INPUT_PULLUP that enables a built-in 20k pullup resistor on a digital input line. A typical non-illuminating switch would simply short the pin to ground, and the software can then read HIGH for open and LOW for closed.
This is my idea for reading the 12v switch using an NPN transistor, but I'm not an EE and I'm not sure where the resistors go or what strength they should be. The NPN transistor I have handy is a 2N222A (Vceo 40, Ic 600, power dissapation 625 mW), but I'm open to swapping that with something else. The resistors I'm less sure of. I think there should be R1 between ACC and the base, because there's +12v flowing there when the switch is closed. And I also think I need a pull-down resistor R2 on the base. Am I on the right track here, and if so, what resistance should R1 and R2 be?
The illuminated switch is a Radio Shack 275-0010, if you need more detail on that. I'm looking for an answer that will show a reliable, minimal way to read the state of this particular switch on the Arduino, including the correct values for any resistors needed on the circuit. Thanks!