Next, you will need to specify the COM port your board is connected to. Click Tools → Port and select the port from the list.

DCS-BIOS comes with a script that automatically connects a serial port to DCS. This serial port is the means by which your PC and your Arduino Board communicate. To initiated this connection you need specify the COM Port to use. You will use the same COM Port that the Arduino IDE used to program your board. To begin…​

The final step is to initiate the upload. This is done by clicking on the Arrow in the circle just below the Edit drop down menu. When the upload begins, a green bar will apear and show the progress of the upload. When it disappears the upload is complete.

This is the code that you have cut and pasted from the Control-Reference document. It tells the library what types of controls you are connecting to your Arduino board. DCS-BIOS knows how to handle push buttons, toggle switches, rotary encoders, rotary switches, potentiometers, LEDs and servo motors. The Arduino Library Reference section (below) documents all of the controls that are available for you to use.

DCSTraining Manual

Once you have done that, you need a way to connect these controls to your DCS: World aircraft. If that aircraft is the A-10C, read on to find out if DCS-BIOS is right for you.

No matter what you wish to connect to your Arduino board, its more than probable someone out there has already done it and documented the results for you to use.

On a low-end system (running DCS at 10 to 15 fps), we did not notice any measurable performance impact. On a high-end system, running DCS-BIOS reduced the framerate from 55 fps to 52 fps (about 5% slower). The additional computation it requires of your PC or its precious resources is negligible.

Image

This is where you can obtain and manipulate the infomation that DCS is exporting. You can specify what you wish to obtain such as engin gauge data or CMSP displays that the Ardiuno has receievd from DCS. You can then send this out to "Real" gauges or displays on your panels. A more detailed explanation of how to get this data and what you can do with it is detailed in the Appendix. Even if you do not intend to display anything you still must include this function. If you do not, your sketch will fail to upload.

Another function of this template is to automatically gather output data from DCS. You can use this data to make gauges function, displays work or indicator lights to light up. We will provide you with several examples in the appendix.

Each DCS-BIOS control can have multiple related outputs. An output represents a piece of information that is exported from DCS, for example the position of the flaps position indicator.

If a control supports the fixed_step interface, you can increase its position with an INC argument and decrease its position with a DEC argument. An example would be a rotary encoder used to change the frequency of a VHF radio.

It will cover all of the different control types that are supported by the Arduino library. The information provided at this point may require some level of knowledge with Arduino programming.

Some values (such as radio frequencies) are exported as character strings. The reference documentation will provide a code example that uses a DcsBios::StringBuffer to execute a piece of code whenever the value changes.

The Switch3Pos class defaults to the center position, so (if your switch even has a pin for that) you don’t have to connect it to anything.

If the "Simple" view mode, the reference documentation displays only the "most appropriate" code example for each control.

1.5 If you do not have an existing Export.lua file in your Scripts folder, copy Scripts\Export.lua from the DCS-BIOS download to your Scripts folder. Then continue with step 2.

We understand the frustrations when you try to build something or use something that has little or no instructions. This document was produced to ensure you have the help you need. It was written in easy to understand terminology aimed specifically at the novice. You do not have to be a programmer or an electrical engineer to understand it. After you read this User Guide, you will be able to connect a simple switch panel to DCS.

Plug your Arduino board into a USB port. If any drivers are required there will be instructions as to how to install them. It does vary between Arduino boards but it’s no different really than installing a headset or joystick. The USB port provides power to the Arduino board but you can use a wallwart providing its 12v. There is an onboard jack to plug into.

The second notation PIN is also a placeholder however, you have to replace it with the pin number that your control is attached to. In the Control-Reference document, placeholder that require you to assign a specific pin number to are always highlighted in"RED" There also a few knobs/switches in your cockpit represented with two separate controls. For example, the volume controls on the A-10C intercom panel have one DCS-BIOS control for the volume and a separate control for the mute function.

For example, you might want to use a rotary switch for the TACAN mode dial in the A-10C and use the DcsBios::SwitchMultiPos code snippet. For the same control, you could also choose to use a rotary encoder.

What we are providing is the means to allow any novice cockpit builder to create a functioning switch panel and/or LED Indicators that will interact with their DCS aircraft. Most importantly, you do not need to be a programmer or electronic engineer to accomplish this task. With DCS-BIOS, it’s straight forward.

The communication protocol that DCS-BIOS uses to talk to your panel was designed with slow serial ports in mind. Your indicators, gauges and displays will never stutter or lag during a flurry of activity in the cockpit. Pressing the signal lamp test button when spooling up the engines, or when half your caution lights panel is blinking after a SAM hit will have no impact on how fast your cockpit instruments respond.

The purpose of this next section is to demonstrate how easy it is to use DCS-BIOS to create a working switch panel and have it connect to your DCS aircraft.

You now do the same for the LED that respresents the Master Caution warning. As before, you go into the Arduino IDE, to the line of code you pasted for it. Change the word "PIN" to the pin number you connected the LED to. The word "PIN' gets replaced with 13. The line of code for the LED Master Caution warning should change as follows:

After choosing a code example, copy it to your Arduino sketch (refer back to the MasterCaution example to see where to copy it) and replace all the parts in red with your own values (usually the pin numbers that this control is connected to).

left click in the box with the yellow background to highlight the example code. Then copy the selected text to your clipboard by pressing Ctrl+C. Now move to the Arduino IDE and paste this line in the space just below where it says "paste your code below here".

DCSF18 manual pdf

The Control-Reference documentation is included in the doc/ subdirectory in the DCS-BIOS download. Simply double-click Control-Reference.html to open it in your web browser.

DCSF-14 manual PDF

If you do have a programming background or simply want to know more, we have a Developer Guide that explains the internal workings of DCS-BIOS in greater detail.

Did you notice the red highlighting in the control reference document? It highlights the word "PIN" or "PIN_A, PIN_B" etc. These are temporary placeholders that you will be changing.

1.2 Open a new Explorer window (for example by opening "My Computer"), paste the following into the address bar and press return:

Congratulations, you have completed all of the one-time setup steps. From now on any panel that you create will only require you to complete steps 4 and 5.

Start Notepad++. Open the`connect-serial-port.cmd` file which is in the DCS-BIOS folder you previously downloaded. With the file on the screen the second line will read as:

This web page is the reference document we are referring to. It lists every single DCS module that DCS-BIOS supports (Only the A10 for now), every single panel found in that aircraft, and every single corresponding switch, push button and rotary knob or whatever associated with that panel and the corresponding code that you will use to create your sketch.

This line tells the Arduino board at what speed communication will take place between you Arduino board and DCS. This setting needs to match the one in connect-serial-port.cmd. 500000 is the fastest the Arduino can handle and is the default. You will probably not need to adjust this whatsoever .

Fortunately, the caution lights data is located in three consecutive 16-bit integers in the DCS-BIOS export address space. The following code should get you started:

This manual will explain how you can use DCS-BIOS to connect the clickable cockpit of a DCS: World aircraft to real-world hardware such as toggle switches, push buttons, rotary encoders, potentiometers and displays.

DCSf16 manual pdf

The Arduino IDE uses what are referred to as "Libraries" to help you make various types of devices work properly using a minimum of commands. There are libraries for using LCD displays, stepper motors, servos etc. It’s a long list. We have produced such a library for using DCS-BIOS and it is called the DCS-BIOS Arduino library. As with all libraries, it was developed to make your life easier when it comes to writing a sketch. However, libraries need to be installed and this next step will guide you through that process.

To use the example code from the reference documentation in your Arduino sketch, you first have to choose which code example to copy. That depends on what type of control you want to connect.

Image

This tutorial will show you how to read the DCS-BIOS control-reference documentation to create a sketch for any panel in the cockpit.

The reference documentation will offer example code for a DcsBios::RotaryEncoder. The default step size is 3200. You will need to experiment to get the right sensitivity.

1.6 If you already have an Export.lua file, open it in a text editor (we recommend Notepad++) and append the following line to the end:

Create an object of type DcsBios::ProtocolParser. You need not be concerned with this line of code other than you do not change it.

DCSKiowa Manual pdf

So you want to build a panel for your DCS: World aircraft. Whether you own a CNC machine or just a drill and a hot glue gun, you probably have some idea of how to use the tools available to you to mount controls such as push buttons, toggle switches, rotary encoders and potentiometers to a faceplate.

Rotary encoders usually have three pins (the ones with an integrated push button have two extra pins for a momentary on push button). Connect the left pin and right pins to any two of the Arduino pins 2 through 12, A0 through A5, and the middle pin to ground. If you find it is functioning opposite to what you want you can just swap Pin A and B on the board or in the sketch.

If you are building the Caution Lights panel, you probably don’t want to use several Arduinos to get 48 output pins. You want to use a LED matrix design instead.

Lets start with the switch that you are using to reset the Master Caution. You attached it to Pin 10 on the Arduino board. You now need to go into the Arduino IDE, to the line of code you pasted for the Master Caution Reset switch. Change the placeholder "PIN" to the pin that switch is connected to. In this particular case it was Pin 10. The word "PIN' gets replaced with 10. The line of code for the Master Caution switch should have changed as follows:

If a control supports the set_state interface, its current state can be set by sending it a number as an argument. For example, you can set the TACAN mode dial in the A-10C to the A A REC position by sending TACAN_MODE 3.

Dcsmanual

Each control is identified by a unique identifier and is associated with a category, which is usually the panel it is found on in the DCS aircraft cockpit.

To develop a sketch for your panel, you are going to copy pieces of example code from a reference document that we have provided.

"So ED just broke my switch panel with their latest update". DCS-BIOS will not let that happen. DCS-BIOS isolates your switch panel from the impact of any changes that Eagle Dynamics might introduce in an update. In the extremely rare event that Eagle Dynamics does make a change that breaks something, we will ensure DCS-BIOS is immediately updated. Your panels will always maintain their functionality.

The Home Cockpit section on the ED forums provides numerous examples of how to connect a switch panel to DCS. This section explains why you should pick DCS-BIOS over the alternatives.

There are a variety of interface boards available that allow you to connect switches or rotary encoders or maybe even both to DCS. DCS-BIOS however, extends way beyond any solution you might presently find. In fact, it is the most comprehensive means of connecting your switch panel to any combination of your DCS aircrafts' buttons, switches, rotary encoders, potentiometers, push buttons, three way switches etc., etc. In short, if it can be manipulated using Lua, DCS-BIOS supports it.

Along the top of the web page, there are "filters" in the form of drop down menus that can be used to display precisely what you are looking for. You have the choice of what aircraft you would like to work with (The A10 is your only choice at the moment), the type of information you would like displayed (basic or advanced) and every single panel on the aircraft you chose to work with. Stay away from the advanced tab until you know what you are doing.

With your sketch open in the Arduino IDE you need to tell the IDE what board you are using. Do this by Clicking on Tools → Board and then select your board from the list that is displayed.

2.2 Connect your LED and current limiting resistor to the Arduino board at pin 13 and pin GND (ground). Pay attention to the polarity of the LED before you connect it. The cathode, which is the negative side always goes to pin GND. Nothing will start smoking if you connect it backwards. It just won’t work until its connected properly.

The solution is to assign another viewport to these indicators (through MonitorSetup.lua), so they exist even when the cockpit is not shown. You can make the viewport 1x1 pixels in size and place it outside of your visible screen area. For example, if you have no monitor above the primary one, you could place the viewport at coordinates (0, -10).

The first notation between the brackets "AHCP_CICU" is a placeholder for a piece of data that gets sent to DCS when a change occurs to a pin on the Arduino board.

Before you start plugging in wires and resistors, take a few minutes and have a look at the Arduino board you are using. Get familiar with the pin designations printed on your board. It would be well worthwhile spending a few minutes on the Arduino web site and do a bit of reading on the basics of using Arduino boards. There are numerous YouTube videos that will introduce you to the world of Arduino. This will all help as you move forward to more complex types panels. So lets start…​

F22DCSmanual

An array of pin numbers that the rotary switch positions are connected to. The first pin number corresponds to state 0 of the input, the second to state 1, etc.

As before, left click in the box with the yellow background and then copy it to your clipboard. Move to the Arduino IDE and paste this line in the space below the last one.

The popularity of the Arduino platform has also spawned a huge number of online tutorials, guides and blog posts. There is an almost endless supply of support available. In fact, you may also find numerous other uses for it besides controlling your cockpit.

If your intent is to include displays and/or analog gauges with your panels you will need to have additional programming knowledge. There are displays in the aircraft that could incorporate LCD displays, LED displays or OLED displays. In addition there are analog Gauges in the cockpit that could be built using stepper motors, servos’s or even air core motors. With such a wide choice of components available, it really is beyond the scope of this particular document to provide instruction on every possible solution.

Even without knowing much about DCS-BIOS, you might have guessed that this says there is a push button connected to pin 10 that should operate the master caution button and that the LED on pin 13 should light up then the master caution button does.

DCS-BIOS was designed to work with the Arduino family of microcontroller boards. Why? The choice was easy. By using a popular, general-purpose microcontroller development board instead of designing a custom PCB, we benefit from the low cost associated with mass production and economics of scale. Suitable boards can be bought for approximately $25 from the official Arduino store. 100% compatible clones can be purchased on eBay or Amazon for just a few dollars each.

A function which accepts an argument of type char*. This function will be called whenever the string output has changed. It will be passed the new value as an argument.

If a control supports the variable_step interface, you can increase or decrease its position by a certain amount by sending +NUMBER or -NUMBER as an argument, where NUMBER is an integer.

Click Sketch → Import Library → Add Library…​ and then go find the ZIP file you downloaded and select it. The Arduino IDE will do the rest. That’s all there is to importing libraries into the IDE.

The number of the Arduino pin that the LED (and current-limiting resistor) are connected to. Prior to connecting multiple LED’s to your Arduino board, it would be advisable to read the section on LED’s on the Arduino web site.

Now go back to the control reference web page. Scroll down a bit until you come to the UFC_MASTER_CAUTION / Master Caution Reset entry.

Nell'era dei fotomontaggi alla portata di tutti, con un po' di fantasia è facile produrre immagini spettacolari. Ma ci sono ancora foto nelle quali gli effetti ottici sono frutto dell'abilità del fotografo, che applica  prospettive distorte ad arte e tagli particolari, oppure sono merito di installazioni artistiche davvero insolite come quelle di  Liu Bolin, mimetizzato perfettamente in un supermercato. Provate a trovarlo nella fotogallery !

Download the DCS-BIOS Arduino library from GitHub. DO NOT extract it. It also doesn’t matter where you download the file to as long as YOU know where it is as you will need to point to its location in the next step.

The specifics of this process may vary slightly for different Arduino boards but for the most part they all follow the same basic routine. We use the Arduino UNO in this example.

A DCS-BIOS output value of 0 will be mapped to minPulseWidth, the maximum output value of 65535 will be mapped to maxPulseWidth. You will have to choose these values so that the minimum and maximum positions are at the beginning and end of your gauge’s scale.

I imagine your next question is "what is an IDE". The Arduino IDE is a program that you will download and install on to your PC. You use it to write small programs (they are called "sketches") and upload them to your Arduino board. You should probably read the page describing how to use the IDE on the Arduino web site. It is very simple and you should have little to no difficulty understanding what to do. So to continue…​

The reference documentation will offer example code for a DcsBios::SwitchMultiPos and (where appropriate) a DcsBios::Switch2Pos or DcsBios::Switch3Pos.

You are now going to create a sketch for your Arduino board that connects it to DCS and makes your switch and LED work as in your DCS aircraft cockpit. In order to simplify this process you will begin your sketch by opening a "template" that we have provided. Until such day as you become an Arduino programming expert you will start every new sketch with this template. It provides all of the essential code necessary to communicate with DCS. It automatically reads the state of your connected switches and reports this to DCS-BIOS which then updates the switches of your DCS aircraft.

Have some way to make electrical connections. That can mean a "breadboard" and jumper wires, a soldering iron, a wire wrap tool, …​

Click File → Examples → DcsBios → TemplateSketch to open the template program that comes with the DCS-BIOS Arduino library.

The first code snippet for integer outputs is meant to be inserted into the onDcsBiosWrite function if the DCS-BIOS Arduino library cannot do what you want. It shows you how to extract the value using the address, mask and shift value of the output.

You’ve heard of people trying to learn Lua just to write their own Export.lua file. In many cases this was an exercise in frustration. DCS-BIOS was produced so you don’t have to worry about learning how to make your own Lua files. If you can connect two wires together, copy and paste text and follow step-by-step instructions, you can make a functioning panel.

Add the lines of code from the control-reference.html documentation to your sketch for the switches and/or LED’s you wish to use.

First, select the module. At the moment your only choice is the A10. Second, select the type of view. Choose Simple if it is not already displayed as the default. Finally, the "Category Filter" dropdown box will provide you with a complete listing of all the panels and you can select the panel you are looking for. ==== Supported Controls DCS-BIOS refers to switches, rotary encoders, potentiometers, push buttons etc. as " CONTROLS". The following are all of the supported Controls available in DCS-BIOS:

Unless you are doing something more advanced such as using something other than a serial port to talk to your DCS computer, this is the only part you need be concerned with.

This statement creates a loop() so the Arduino will continually read data from DCS. It then sends it to the DcsBios::ProtocolParser for additional processing.

DCSApache Manual

Image

Servos have 3 wires which are black, red and orange or yellow. Black and red are for 5V power in. The orange or yellow wire is the signal and must be plugged into one of the PWM pins having the ~designation. On the Uno those pins are ~3, ~5, ~6, ~9, ~10, ~11.

Connect your three-position toggle or rotary switch so that the first (left or down) position connects pinA to ground and the last (right or up) position connects pinB to ground.

DcsBios::PollingInput::pollInputs()` causes the DCS-BIOS library to check the state of all of your connected push buttons, toggle switches, rotary encoders, etc. If it finds that something has changed it sends a message to DCS to initiate that same change. You push your button…​DCS shows that button being pushed.

But how do you know what to put here for other controls? You will have to consult the "Control-Reference" documentation.

This line specifies that communication between the Arduino board and your DCS computer will be via "serial port". It can, however, be modified so you can use TCP or UDP to communicate. We anticiapte that most installation will use a serial port.

These are libraries that have been included to make your sketch function apropriately. They are always placed at the beginning of a sketch. It ensures that the Arduino IDE will include the required libraries when it compilies your sketch for uploading to your board. In addition to the DCS-BIOS.h library you will also see that the Servo.h library has been included. Please note that even if your sketch does not use the ServoOutput class of controls you still have to include Servo.h. Otherwise your sketch will fail to load.

Go to your saved Games folder/DCS-BIOS/doc and double-click on the file control-reference.html Your web browser will automatically open and display all sorts of colorful headings and code. If you see a red warning instead, you need to enable JavaScript in your web browser and reload the page.