Electricity 101
Facts
- The Arduino will fry if you try to shove too much voltage or current into an input pin.
- Current = Voltage divided by resistance
You need to ensure you're not applying more than 5v to the input. The Arduino will register a logic 1 with a voltage as low as 1.8 so be safe.
To make sure that the current doesn't start communications via smoke, the Gods invented what is commonly called a current limiting resistor. I've read in a couple of posts here about a 200 ohm resistor. Sorry lads, that ain't goin' to cut it. Do the math.
5 / 200 = 0.025 that's 25 milliamps and about 3 times what you should be limiting your input pins to. These are logic levels!! You're not trying to operate a servo motor!!
Any and all unknown logic inputs should be treating with a 1K limiting resistor. This makes sure that the current doesn't exceed 5 milliamps which is plenty, and no smoke. One last calc is the power which is 5v * .005A = .025W so a standard 1/4 watt 1K resistor is fine.