ArdSimX Interface
I use the excellent ArdSimX Interface to interface with X-Plane.
ArdSimX runs on inexpensive Arduino hardware and makes it simple to interface electrical components with X-Plane.
I plan on upgrading to SimVimCockpit (aka ArdSimX 2.0) in the future to take advantage of multiplexers and allow for modular avionics but ArdSimX is working very well for my current needs.