Reading oil pressure switch from motorcycle with Teensy (Arduino)
It's a switch that connects to ground when there's no oil pressure. Measure it with an ohmmeter with the wire disconnected: should show a low-ohm when the engine is stopped, and open when the engine is running.
If there's no LED connected to it, in theory you could pull the switch up with a resistor to 3.3V.

The safer way would be to use a diode to isolate the Teensy, as follows:



simulate this circuit &ndash; Schematic created using CircuitLab
MORE: The lamp on the dash would have pulled the Teensy pin up to 12V or so, which would have killed it.
As for the ESD protection, I deliberately chose components that are easy to find.
How it works:

D2 blocks any current in (any voltage higher than 3.3V)
D3 clamps the input to GND - 0.7V
Any below-ground fault current is limited by R2.

It's simple and should work fine.
If you want to beef this up even more, you have a couple of options:

Use a Schottky diode for D3
Use a Transient Voltage Suppressor (TVS) diode for D3

The Schottky diode has a lower forward voltage (0.3V) and faster response. A TVS is basically fast-acting Zener diode that catch both negative or positive spikes. But, D2 already blocks positive spikes, so that's overkill.
Finally, would a capacitor help? Only if you connect it so that it shunts energy back to the originating source, that is, someplace close to frame ground. If it's to Teensy ground it would actually make things worse as it provides and AC path to the logic ground, then back to the frame.