Baron 58 simulator standalone Arduino code development archive (2012-2013)
The Baron 58 panel simulator project was considered as platform for creating an effective control interface based on Arduino. Here you can see our early "pre-library" Arduino program code developments for Baron 58 cockpit before we switched to our later "library-plugin-based" interface.
Arduino controls for Baron 58 cockpit with 128-inputs extentsion board
Control interface for Baron-58 panel is based on one Arduino Mega-1280 and one Ethernet Shield. For input extension DIY extension board for additional 128 inputs was made (it uses 12 digital pins of Arduino). Together with another Arduino pins this interface represents all of Baron controls. For annunciators the output extension board was used. It controls the 24 LEDs of annunciators panel, gear and flap lamps and audio panel LEDs.
Here is the pages with description of all building stages of the Baron-58 Simulator
This B58 panel initially was controlled by "plain" code writen specifically for our panel (July 2013) and worked with X-Plane UDP protocol. It was quite large (~1000 lines) program for Arduino Mega1256.
The method UDP CMND
is mainly used for all actuators (send commands to simulator instead of Datarefs used in previous vesions) The CMND function was added - comsend (char Data_com)
The 3 functions are used for data transmission - comsend (for commands), drefsend ( for drefs), charsend (for chars).
The program reads each 16 ports of the expansion bus (one by one), checks each actuator position and,
if in was changed it calls needed function for commands or datarefs and stores current input status in memory. Then the program reads next port (8 inputs)
Code block for UDP reading checks the presence of incoming UDP packet and, if the packet is received, it is looking each 36 byte for number of data groups #1,13,14,34,52,62,67,105,108,114,124,127
(time, Flaps, Brakes, RPM, Alt bus, Fuel, Gear, OMI, Autopilot on, Pitot, Bus volts, Gear warn).
Program reads values of each needed parameter in each group and sends them to LED indicators and servos.
Later it was rebuilt for XPData Library. Currently We plan to use this B58 Panel as test platform for our latest SimVimCockpit interface.