Interfacing serial with Orbiter

Zatnikitelman

Addon Developer
Addon Developer
Joined
Jan 13, 2008
Messages
2,303
Reaction score
6
Points
38
Location
Atlanta, GA, USA, North America
I too have decided to build a "flight deck" of sorts. Which really means some stuff clamped to my desk rather than a full blown simpit (someday, maybe), but you gotta start somewhere right? I've got the Arduino Mega, and the Arduino side of things won't be that hard to program, I've already experimented with it and the serial debug box included with the compiler, but I'm stuck on how to make it work with Orbiter.

I can't seem to find a tutorial on how to actually make serial interfacing through C++ work. MSDN has an article on it, but doesn't tell me what to #include so I'm lost there. There are several tutorials I've found through Google, but they seem to rely on libraries, but don't say where to get them (or even if they're available and ok for use).
Does anyone have some pointers, or a link to a good C++ tutorial for serial communications?
Thanks,
Zat
 
Ok, The USB port on the Arduino uses an FTDI chip. Luckily for you this is easier with Orbiter than with FSX.

You will need to program a DLL and uses the stuff on this page to communicate with the chip.

There is a programming guide here.

Basically, you well need to set up the connection when Orbiter loads up, and then send data when required.

This way could be better, I haven't tried using my Arduino to talk to my PC yet, but I plan too soon :P
 
Last edited:
If you are using a Orbiter beta version, you can use a lua script to communicate via serial interface. I did that with my retro style 7 segment led display (PIC based). Dr. Schweiger implemented nearly all API functions in lua, so you don't need to write (and debug) a DLL.
 
Back
Top