Jump to content

DCS-BIOS Discussion Thread


Recommended Posts

Hi Hansolo,

thanks for taking the time. As of now, this works:

 

 

#define DCSBIOS_IRQ_SERIAL //must go first!
#include "DcsBios.h"

int RedLed = 9; //D9
int YellowLed = 7; // D7
int GreenLed = 8; //D8


//==================== Main ===================================

void onAoaUnitsChange(unsigned int newAoaValue) {
   if (newAoaValue >31000 && newAoaValue < 37000)
     {digitalWrite(GreenLed, HIGH);}
   else {digitalWrite(GreenLed, LOW);}

   if (newAoaValue >37000 && newAoaValue < 43000)
     {digitalWrite(YellowLed, HIGH);}
   else {digitalWrite(YellowLed, LOW);}

   if (newAoaValue >43000 && newAoaValue < 49000)
     {digitalWrite(RedLed, HIGH);}
   else {digitalWrite(RedLed, LOW);}
 }
DcsBios::IntegerBuffer aoaUnitsBuffer(0x1078, 0xffff, 0, onAoaUnitsChange);


// ============================== Essentials ==================
void setup() 
 {
 DcsBios::setup();

 pinMode(RedLed, OUTPUT);  
 pinMode(YellowLed, OUTPUT); 
 pinMode(GreenLed, OUTPUT);
 }

void loop() 
 {
 DcsBios::loop();
  }

 

 

So far, so good! :)

 

The indexer lights will work independently of the built in AOA indexers lights of the A-10, just depending on the AOA.

 

 

However, now I want to implement this to another aircraft, like the C-101.

 

Do you know how I can find out the adress of the AOA of other aircraft?

Link to post
Share on other sites
  • Replies 1.3k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

I don't see it in the DCS-BIOS control reference. And I had a brief look at CaptZeen's Helios profile too - same again, no door gunner stuff.

Is it possible to, somehow, change fixed step rotaries to variable step rotaries in DCS BIOS?

Not so trivial - we all learn something new from day to day. Here you go:   You can also put the capacitor below the switch - parallel means it does not interrupt the line to the switc

Any chance that the DCS Bios install routine could be updated to see non standard installations of DCS??

i9-9900K @ 5.1 - delided, Gigabyte Aorus Elite MB, Corsair H150i Pro water cooler

64gig G-Skill DDR4@3600, MSI 2080Ti

Winwing Super Taurus, Super Libra, TO and Combat panels

MFG Crosswind pedals, Tek Creations panels

Trackir

Link to post
Share on other sites

AOA Indexer in Viper

 

Hello all,

 

The AOA_INDEX_BRT_KNB actually controls the AR Status Indicator Dimming Lever (which is actually the title pf this control), however, there is no actual AOA index brightness knob control in the reference - any ideas?

 

Best.

Link to post
Share on other sites

Hello,

 

Quick question to get DCS-BIOS to Autostart with DCS...

 

Is there a way I can manually configure DCS-BIOS to autostart (by creating or editing a file somewhere)?

 

I have DCS installed in a non-standard folder, -AND- I have my Users folder on another drive (didn't want it on my primary SSD). I was able to get the DCS-BIOS Virtual Cockpit connection to work by manually adding the line to the Export.lua file.

 

When I try checking "Autostart DCS-BIOS" in the web setup, I get the message,

"error: profile directory does not exist, please start and exit DCS and try again: C:\Users\[uSERNAME]\Saved Games\DCS"

 

The actual path is:

E:\BackMeUp\Users\[uSERNAME]\Saved Games\DCS

 

There must be a symbolic link for the C:\Users folder, because if I type a path of C:\Users\[uSERNAME]\Saved Games\DCS into Windows Explorer's address bar, it finds the DCS folder in the E drive.

 

 

Thanks,

 

--Doug

Link to post
Share on other sites
Heys, new to DCS-BIOS and was hoping for some help.

 

How do i know what value i should use for servo pulse positions numbers?

 

I made an arduino program that sends specific pulse times to the servo. If you hook up a pot to vary it, and an LCD to display it, you can adjust the pot until the needle gets to the 0 and max points and record the numbers.

 

You can use the servo.h library and "servo.writeMicroseconds(uS)" to send us values rather than the default degrees.

 

https://www.arduino.cc/en/Reference/ServoWriteMicroseconds

Link to post
Share on other sites

awesome mate, cheers.

 

ive never had to connect an LCD, so that will be fun to learn :)

How do i connect the POT to the gauge?

 

And the next question is, would it be best to have the aircraft in the cold state or aircraft running?

and do we add that sketch you've written to the dcs-bios sketch?

Link to post
Share on other sites
awesome mate, cheers.

 

ive never had to connect an LCD, so that will be fun to learn :)

How do i connect the POT to the gauge?

 

And the next question is, would it be best to have the aircraft in the cold state or aircraft running?

and do we add that sketch you've written to the dcs-bios sketch?

 

Make a completely separate program that's only job is to output servo pulses microseconds

Use an analogue input to connect the pot.

 

Connect the gauge servo directly to that program. It's completely separate. The idea is for this program to provide the "end stop" numbers you put into your DCS BIOS programs.

Link to post
Share on other sites

I found this for controlling the servo,

 

 

 

// Controlling a servo position using a potentiometer (variable resistor)

// by Michal Rinott <http://people.interaction-ivrea.it/m.rinott>

#include <Servo.h>

Servo myservo; // create servo object to control a servo

int potpin = 0; // analog pin used to connect the potentiometer

int val; // variable to read the value from the analog pin

void setup()

{

myservo.attach(9); // attaches the servo on pin 9 to the servo object

}

void loop()

{

val = analogRead(potpin); // reads the value of the

// potentiometer (value between

// 0 and 1023)

val = map(val, 0, 1023, 0, 179); // scale it to use it with

// the servo (value between 0 and

// 180)

myservo.write(val); // sets the servo position according

// to the scaled value

delay(15); // waits for the servo to get there

}

Link to post
Share on other sites

I've underscored changes here.

 

// Controlling a servo position using a potentiometer (variable resistor)
// by Michal Rinott <http://people.interaction-ivrea.it/m.rinott>
#include <Servo.h>
Servo myservo; // create servo object to control a servo
int potpin = 0; // analog pin used to connect the potentiometer
int val; // variable to read the value from the analog pin
void setup()
{
myservo.attach(9); // attaches the servo on pin 9 to the servo object
}
void loop()
{
val = analogRead(potpin); // reads the value of the
// potentiometer (value between
// 0 and 1023)
val = map(val, 0, 1023, [u]500,2500[/u]); // scale it to use it with
// the servo (value between [u]500 and[/u]
// [u]2500 microseconds[/u])
[u]myservo.writeMicroseconds[/u](val); // sets the servo position according
// to the scaled value
delay(15); // waits for the servo to get there

[u]// Insert LCD output code here to send "val"
// Alternatively, use the arduino's serial routines to send it to the PC via USB and the IDE's serial monitor[/u]

}

 

Make sure the pot is centred BEFORE powering this up, as the set end stops are likely to be outside the range of your servo.

Link to post
Share on other sites
sorry to ask so many questions, very new at the whole Arduino thing.

so im not sure how i proceed with adding more code to a sketch

 

You need to "mix" new code in, rather than just add it on.

Some bits, like variable and library definitions need to go at the beginning.

Some bits, such as serial port or LCD start code need to go in the setup() routine.

Then it becomes "wild west" time. ;)

If you have a section of code (like the LCD display routine I added below) you can add that at the end, then call it in another function or the main loop.

 

 

the big question is do i just add that to the bottom of the code you cave me?

 

Add the setup lines at the top of the code, then use the lcd.print etc. lines where appropriate in the main loop.

 

Something like this (using the code you posted and I modified):

 

// Controlling a servo position using a potentiometer (variable resistor)
// by Michal Rinott <http://people.interaction-ivrea.it/m.rinott>
#include <Servo.h>
Servo myservo; // create servo object to control a servo

[u]// Include the LCD library:
#include <LiquidCrystal.h>
// Create an LCD object. Parameters: (RS, E, D4, D5, D6, D7):
LiquidCrystal lcd = LiquidCrystal(2, 3, 4, 5, 6, 7);[/u]

int potpin = 0; // analog pin used to connect the potentiometer
int val; // variable to read the value from the analog pin
void setup()
{
myservo.attach(9); // attaches the servo on pin 9 to the servo object

[u]  // Specify the LCD's number of columns and rows. Change to (20, 4) for a 20x4 LCD:
 lcd.begin(16, 2);[/u]
}
void loop()
{
val = analogRead(potpin); // reads the value of the
// potentiometer (value between
// 0 and 1023)
val = map(val, 0, 1023, 500,2500); // scale it to use it with
// the servo (value between 500 and
// 2500 microseconds)
myservo.writeMicroseconds(val); // sets the servo position according
// to the scaled value
delay(15); // waits for the servo to get there

[u]// This calls the LCD output code
lcdOutput();[/u]

}

[u]void lcdOutput(){

// This code shows the val variable on the LCD.
// It right- justifies the number so that it shouldn't jump about too much if it gets glitchy

 // Set the cursor on the first column and the first row, counting starts at 0:
  lcd.setCursor(0,0);
 lcd.print("Output:  "); // Clear the line
 if (val >= 1000){
   lcd.setCursor(8,1); // Set cursor for 4-digit us number 
   }
 else{
     lcd.setCursor(9,1);// Set cursor for 3-digit us number
   }

 lcd.print(val);
 lcd.print("us  "); 
}
[/u]


 

The extra bits are underscored again.

 

Don't forget to make sure the LCD pins match the definition line. Either change the definition line or your wiring.

 

ONE CAVEAT: I have not tested this code. It looks like it should work, But I don't have the ability to run it right now.

 

I could post mine, but it uses a 20x4 I2C display and a rotary encoder, so it'd not be much use to you.


Edited by No1sonuk
Link to post
Share on other sites

Hi guys: I don't know if this proper thread to reach out for guidance but, here it goes. I'm new to DCS-Bios and, I've got a problem loading the latest version. I received my new TekCreations F18 UFC last month and, as instructed, I downloaded DCS-Bios and configured it accordingly. Everything was working perfectly. However, after loading the latest DCS update, it all went to hell in a handbasket. TC support has been really responsive but, I when I checked on my DCS-Bios config I found I could no longer access the DCS-Bios Hub to verify my plugins and connection (see attached screen snip). I could really use some help to get this program back up and running.

Thanks in advance for your assistance.

584965133_DCSBIOSCallup.PNG.e8869c8da993f42b8461945d4325e4eb.PNG

Link to post
Share on other sites
  • 2 weeks later...

F-14 remote display

 

Good evening guys. I have this information about a display I need to read from F-14B and use dcs bios and Arduino to display it on a 7 segment.

 

My question is, what would be the code to read the value and convert this to string variable in arduino? (I can later convert that to integer, I know how to do that) It is not in DCS bios.

 

Thanks

 

PLT_UHF_REMOTE_DISP - PILOT UHF ARC-159 Radio Remote , UHF 1 , exported as string

Link to post
Share on other sites
  • 4 weeks later...

Hi , can someone help me please to get the Fuel Flow Gauge (F-16) on an 128x64 Oled Display connected to an Arduino Nano .. ?

Everything works fine (Nano with Display / DCS-Bios..) but cant get the values on the display .. Thank you

Pentium 4 3400 , 1 Gb Corsair , ATI X800XT

Samsung 22" TFT Wide Screen @1680 x 1050

240 GB HD Sata Raid , Soundblaster Audigy 2

Enermax , Zalman , Saitek X-52 , TrackIR 4

Link to post
Share on other sites
  • 3 weeks later...

Can someone help, very new to DCS-BIOS and after installation the program doesn't pick up my main install to allow me to choose modules for installing plugins. It finds my savegames folder but the main install is not there (It's on a seperate drive). Is this going to be an issue?

Link to post
Share on other sites
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...