Here I have collected some of our first "pre-library" Arduino code developments since 2011, related to X-Plane UDP protocol, test code, evolution of algorithms for various input actuators, encoders, early code versions of Baron 58 cockpit program, etc..
Do not consider the samples collected here as practical or finished programs for you cockpit simulator!
These code samples are uploaded here for information purpose, some of them were written as tests programs for familiarizing with Ethernet UDP protocol used in X-Plane to adapt it for Ardino to get data from X-Plane and send data from Arduino to X-Plane.
Some of them ( such as "B58-final") were used in our Baron 58 simulator, before we switched to our later "library-plugin-based" interface.
As you could see, in the earlier program code the "DATA" type message protocol was used, and the size of the program code was huge. Later versions gradually become more compact, the "CMND" and "DREF" type messages was used as primary data protocol. The X-Plane inbuilt Ethernet UDP protocol initially was used in our Baron Arduino/X-Plane interface.All these programs were tested with Arduino Mega 1280 and Ethernet shield 5100.
Later, based on these works we have created Arduino libraries (XPData, ARDref, ArdSim) to replace a mess of single sketches. All these libraries were developed as a simple instrument for cockpit builders and they include several functions for sending input commands and dataref values to X-Plane and receiving data from it for output.