PDA

View Full Version : Need a definitive howto - Simconnect and a simple external switch



WJH308
01-28-2011, 08:55 PM
I learned some C and C++ in highschool long ago. My knowledge of the language ends with console programs and programming AVR's in GNU C.
For the life of me, I do not understand the junk that microsoft has added to the languages.
Here is what I would love to find if it already exists. A tutorial on interfacing an external toggle switch that connects to the computer via a serial port. All I want is step by step instructions on how to make this simple toggle switch turn on the landing lights, or the seat belt sign, etc.
Now I already know how to program an AVR to send data via the serial port. I do NOT know how to make my pc respond to this serial data and further, make the functions work in FSX. All I know is that SimConnect does this, some how. I know there are many products I can purchase that will allow me to do this. That is not the point, I feel an intense need to learn this stuff, I want to learn and do it for my own satisfaction. Long term project is an L1011 cockpit. I need to learn the basics first before I start deciphering synchros in the autopilot controls and communicating serially to FSX.
I have also purchased Mikes book on building recreational simulators and found it to be a great help, although I wished he used AVRs programmed in C rather than PIC's in assembly :P
Thanks if anyone can point me into the right direction

Mike.Powell
01-29-2011, 02:52 AM
You probably have already seen these, but if not:
Simconnect info from MS: http://msdn.microsoft.com/library/cc526948.aspx
Serial port under win32: http://msdn.microsoft.com/en-us/library/ms810467.aspx

This information worked for Windows XP. I do not know if it works for Win7

I suggest working through the simconnect code samples before dealing with the serial comm port.