frumpy Posted January 22, 2023 Posted January 22, 2023 Oh thats a long thread to read. I'd like to build a MB339 homepit with Arduinos and DCS-BIOS. There is no profile existing and I am not good at programming. Is it possible export the data on the LCD (like groundspeed)? How can I continue from here?
No1sonuk Posted January 22, 2023 Posted January 22, 2023 36 minutes ago, frumpy said: Oh thats a long thread to read. I'd like to build a MB339 homepit with Arduinos and DCS-BIOS. There is no profile existing and I am not good at programming. Is it possible export the data on the LCD (like groundspeed)? How can I continue from here? Firstly, assuming you installed the "Hub" version of DCS-BIOS, uninstall it and get the "FlightPanels" version. That one is actively updated, and has the MB339 according to the list. https://github.com/DCSFlightpanels
frumpy Posted January 23, 2023 Posted January 23, 2023 Thanks, will comply. However, I did not find the MB339 in the list, did I miss it?
Диванный пилот Posted January 23, 2023 Posted January 23, 2023 (edited) 39 минут назад, frumpy сказал: Thanks, will comply. However, I did not find the MB339 in the list, did I miss it? Hi, it is included. Check the Picture Спойлер Edited January 23, 2023 by Диванный пилот 1
BlackLibrary Posted January 24, 2023 Posted January 24, 2023 but MB-339 is not finished in BIOS yet. its WIP aka WarLord DCSFlightpanels DCS-BIOS Fork DCSFlightpanels arduino-library DCSFlightpanels DCSFlightpanels-Profiles DCS FP / BIOS Discord Server
Диванный пилот Posted January 24, 2023 Posted January 24, 2023 Well, at least one can start with something. Maybe he will learn how to make missing devices while programming existing ones.
Prayde Posted March 12, 2023 Posted March 12, 2023 hello to all, I have a problem to reverse the direction of rotation of a servo for the electrical panel. I inverted the numbers as the documentation recommends but my servo never changes direction... thanks bye
No1sonuk Posted March 12, 2023 Posted March 12, 2023 5 hours ago, Prayde said: I have a problem to reverse the direction of rotation of a servo for the electrical panel. I inverted the numbers as the documentation recommends but my servo never changes direction... What's the code line you're trying?
Prayde Posted March 12, 2023 Posted March 12, 2023 39 minutes ago, No1sonuk said: What's the code line you're trying? DcsBios::ServoOutput voltU(0x752c,13, 544, 2400); DcsBios::ServoOutput voltE(0x752e,12, 2400, 544);
No1sonuk Posted March 13, 2023 Posted March 13, 2023 That should work. Is the DCS-BIOS up to date? Which version are you using? Also, are the servo time numbers within the correct range for your servo? I notice they're both the same, so you've not calibrated it yet.
Kenpilot Posted March 13, 2023 Posted March 13, 2023 I just got back to working on my simpit and noticed the original DCS BIOS is no longer supported. I'm trying to update all my sketches with the new language and current DCS BIOS software. For the A10 CMSP LCD display, which I have wired to an arduino MEGA, in the sketch language, where do I put the pin numbers for the SCL and the SDA inputs/wires? Most sketches have PIN, where you put the arduino pin number, but the current language doesn't have that. This is the current language for the CMSP Display Line 1 and Display Line 2: DcsBios::StringBuffer<19> cmsp1Buffer(0x1000, onCmsp1Change); DcsBios::StringBuffer<19> cmsp2Buffer(0x1014, onCmsp2Change); Anyone have any idea? Windows 10 ASRock Z370 Extreme4 LGA 1151 (300 Series) MOBO intel i7-8700k (Not overclocked) 16 GB Ram EVGA GeForce GTX 108ti SC Black Edition SSD Trackir
crash test pilot Posted March 13, 2023 Posted March 13, 2023 4 minutes ago, Kenpilot said: I just got back to working on my simpit and noticed the original DCS BIOS is no longer supported. I'm trying to update all my sketches with the new language and current DCS BIOS software. For the A10 CMSP LCD display, which I have wired to an arduino MEGA, in the sketch language, where do I put the pin numbers for the SCL and the SDA inputs/wires? Most sketches have PIN, where you put the arduino pin number, but the current language doesn't have that. This is the current language for the CMSP Display Line 1 and Display Line 2: DcsBios::StringBuffer<19> cmsp1Buffer(0x1000, onCmsp1Change); DcsBios::StringBuffer<19> cmsp2Buffer(0x1014, onCmsp2Change); Anyone have any idea? Take a look at your Mega: Pin 20 and 21 should be labeled SDA and SCL. You dont need to give a pin number.
No1sonuk Posted March 13, 2023 Posted March 13, 2023 6 hours ago, Kenpilot said: I just got back to working on my simpit and noticed the original DCS BIOS is no longer supported. I'm trying to update all my sketches with the new language and current DCS BIOS software. For the A10 CMSP LCD display, which I have wired to an arduino MEGA, in the sketch language, where do I put the pin numbers for the SCL and the SDA inputs/wires? Most sketches have PIN, where you put the arduino pin number, but the current language doesn't have that. This is the current language for the CMSP Display Line 1 and Display Line 2: DcsBios::StringBuffer<19> cmsp1Buffer(0x1000, onCmsp1Change); DcsBios::StringBuffer<19> cmsp2Buffer(0x1014, onCmsp2Change); Anyone have any idea? Those lines call a code function. The top one calls "onCmsp1Change". You then write that function to do what you need with the data. There was a second block of code with each of those lines in the control reference that had the empty function.
Prayde Posted March 13, 2023 Posted March 13, 2023 11 hours ago, No1sonuk said: That should work. Is the DCS-BIOS up to date? Which version are you using? Also, are the servo time numbers within the correct range for your servo? I notice they're both the same, so you've not calibrated it yet. Hello, I have the latest version V0.10.0 and the servos are original for model aircraft. it's works one time and after impossible to change the rotation thanks helping me best regards Prayde
No1sonuk Posted March 13, 2023 Posted March 13, 2023 V0.10.0 is the "HUB" version of DCS-BIOS and is no longer supported. You should switch to the "Flightpanels fork" which, despite having lower version numbers, is actually up to date and actively maintained. Have you tried a program with just the one servo and nothing else? Also, which Arduino are you using?
Prayde Posted March 13, 2023 Posted March 13, 2023 51 minutes ago, No1sonuk said: V0.10.0 is the "HUB" version of DCS-BIOS and is no longer supported. You should switch to the "Flightpanels fork" which, despite having lower version numbers, is actually up to date and actively maintained. Have you tried a program with just the one servo and nothing else? Also, which Arduino are you using? thanks for your advice, i'll switch to this other version of DCS-BIOS and, my bad.... everything is back to normal, it was not a software problem but a hardware one. just a little motherfucker of wires making contact and sending one and the same signal for both servos... thank you for your quick help 1
Kenpilot Posted March 13, 2023 Posted March 13, 2023 (edited) Thanks guys! I put the wires in to pins 20 and 21 on the MEGA. But now I'm having trouble with the language from the DCS BIOS Code reference. I am not very knowledgeable with code or sketch language. Could someone put what exactly I need to put in my sketch for the LCD display to work? This is the language from DCS-BIOS control refrence: void onCmsp1Change(char* newValue) { /* your code here */ } DcsBios::StringBuffer<19> cmsp1Buffer(0x1000, onCmsp1Change); void onCmsp2Change(char* newValue) { /* your code here */ } DcsBios::StringBuffer<19> cmsp2Buffer(0x1014, onCmsp2Change); Thank you!! Edited March 13, 2023 by Kenpilot Windows 10 ASRock Z370 Extreme4 LGA 1151 (300 Series) MOBO intel i7-8700k (Not overclocked) 16 GB Ram EVGA GeForce GTX 108ti SC Black Edition SSD Trackir
No1sonuk Posted March 13, 2023 Posted March 13, 2023 (edited) 4 hours ago, Kenpilot said: Thanks guys! I put the wires in to pins 20 and 21 on the MEGA. But now I'm having trouble with the language from the DCS BIOS Code reference. I am not very knowledgeable with code or sketch language. Could someone put what exactly I need to put in my sketch for the LCD display to work? This is the language from DCS-BIOS control refrence: void onCmsp1Change(char* newValue) { /* your code here */ } DcsBios::StringBuffer<19> cmsp1Buffer(0x1000, onCmsp1Change); void onCmsp2Change(char* newValue) { /* your code here */ } DcsBios::StringBuffer<19> cmsp2Buffer(0x1014, onCmsp2Change); Thank you!! This is cobbled together from some code I wrote for a radio display on a 20x4 LCD, modified for CMSP on 20x2. You'll need the Wire and LiquidCrystal I2C ( https://github.com/fdebrabander/Arduino-LiquidCrystal-I2C-library ) libraries. I think the Wire library is built into the Arduino IDE. #define DCSBIOS_IRQ_SERIAL #include "DcsBios.h" #include <Wire.h> #include <LiquidCrystal_I2C.h> LiquidCrystal_I2C lcd(0x27,20,2); // set the LCD address to 0x27 for a 20 chars and 2 line display // ***************** DCS-BIOS ****************** void onCmsp1Change(char* newValue) { lcd.setCursor(0,0); lcd.print(newValue); } DcsBios::StringBuffer<19> cmsp1Buffer(0x1000, onCmsp1Change); void onCmsp2Change(char* newValue) { lcd.setCursor(0,1); lcd.print(newValue); } DcsBios::StringBuffer<19> cmsp2Buffer(0x1014, onCmsp2Change); // *************************************************************** void setup() { DcsBios::setup(); lcd.init(); // initialize the lcd lcd.backlight(); lcd.setCursor(0,0); // column, row /* The Library needs to initialize hardware */ lc.begin(); for (byte i = 0; i < LED_MODULES; i++) { lc.shutdown(i, false); /* Set the brightness to a medium value, possible is 0-15 */ lc.setIntensity(i, 8); } /* and clear all displays */ lc.clearDisplay(); } void loop() { DcsBios::loop(); } I've NOT tested it, so I don't know if it works. If it doesn't, I can give you my 20x4 radio display code I know does work. Edited March 13, 2023 by No1sonuk
Kenpilot Posted March 13, 2023 Posted March 13, 2023 20 minutes ago, No1sonuk said: This is cobbled together from some code I wrote for a radio display on a 20x4 LCD, modified for 20x2. You'll need the Wire and LiquidCrystal I2C ( https://github.com/fdebrabander/Arduino-LiquidCrystal-I2C-library ) libraries. I think the Wire library is built into the Arduino IDE. #define DCSBIOS_IRQ_SERIAL #include "DcsBios.h" #include <Wire.h> #include <LiquidCrystal_I2C.h> LiquidCrystal_I2C lcd(0x27,20,2); // set the LCD address to 0x27 for a 20 chars and 2 line display // ***************** DCS-BIOS ****************** void onCmsp1Change(char* newValue) { lcd.setCursor(0,0); lcd.print(newValue); } DcsBios::StringBuffer<19> cmsp1Buffer(0x1000, onCmsp1Change); void onCmsp2Change(char* newValue) { lcd.setCursor(0,1); lcd.print(newValue); } DcsBios::StringBuffer<19> cmsp2Buffer(0x1014, onCmsp2Change); // *************************************************************** void setup() { DcsBios::setup(); lcd.init(); // initialize the lcd lcd.backlight(); lcd.setCursor(0,0); // column, row /* The Library needs to initialize hardware */ lc.begin(); for (byte i = 0; i < LED_MODULES; i++) { lc.shutdown(i, false); /* Set the brightness to a medium value, possible is 0-15 */ lc.setIntensity(i, 8); } /* and clear all displays */ lc.clearDisplay(); } void loop() { DcsBios::loop(); } I've NOT tested it, so I don't know if it works. If it doesn't, I can give you my 20x4 radio display code I know does work. I tried this and unfortunately I got a bunch of error messages when I tried to verify it. Windows 10 ASRock Z370 Extreme4 LGA 1151 (300 Series) MOBO intel i7-8700k (Not overclocked) 16 GB Ram EVGA GeForce GTX 108ti SC Black Edition SSD Trackir
markom Posted March 13, 2023 Posted March 13, 2023 41 minutes ago, Kenpilot said: I tried this and unfortunately I got a bunch of error messages when I tried to verify it. Those tend to be very helpful when asking other folks for assistance... 1
No1sonuk Posted March 13, 2023 Posted March 13, 2023 I think I know the problem - I left some LED driver code in there. Sorry. Try this: #define DCSBIOS_IRQ_SERIAL #include "DcsBios.h" #include <Wire.h> #include <LiquidCrystal_I2C.h> LiquidCrystal_I2C lcd(0x27,20,2); // set the LCD address to 0x27 for a 20 chars and 2 line display // ***************** DCS-BIOS ****************** void onCmsp1Change(char* newValue) { lcd.setCursor(0,0); lcd.print(newValue); } DcsBios::StringBuffer<19> cmsp1Buffer(0x1000, onCmsp1Change); void onCmsp2Change(char* newValue) { lcd.setCursor(0,1); lcd.print(newValue); } DcsBios::StringBuffer<19> cmsp2Buffer(0x1014, onCmsp2Change); // *************************************************************** void setup() { DcsBios::setup(); lcd.init(); // initialize the lcd lcd.backlight(); lcd.setCursor(0,0); // column, row } void loop() { DcsBios::loop(); } I added the LiquidCrystal I2C library to a fresh install that had just the DCS-BIOS library added, and this compiles OK.
Kenpilot Posted March 14, 2023 Posted March 14, 2023 17 hours ago, markom said: Those tend to be very helpful when asking other folks for assistance... You are 100% correct. Unfortunately it was a pretty long list and I was on my way out there door and didn't have time to go through them and see which ones I couldn't figure out on my own. And I know No1sonuk mentioned he didn't try it, and knowing him, I figured he would try it when he was able to to see what was going on with it. 15 hours ago, No1sonuk said: I think I know the problem - I left some LED driver code in there. Sorry. Try this: #define DCSBIOS_IRQ_SERIAL #include "DcsBios.h" #include <Wire.h> #include <LiquidCrystal_I2C.h> LiquidCrystal_I2C lcd(0x27,20,2); // set the LCD address to 0x27 for a 20 chars and 2 line display // ***************** DCS-BIOS ****************** void onCmsp1Change(char* newValue) { lcd.setCursor(0,0); lcd.print(newValue); } DcsBios::StringBuffer<19> cmsp1Buffer(0x1000, onCmsp1Change); void onCmsp2Change(char* newValue) { lcd.setCursor(0,1); lcd.print(newValue); } DcsBios::StringBuffer<19> cmsp2Buffer(0x1014, onCmsp2Change); // *************************************************************** void setup() { DcsBios::setup(); lcd.init(); // initialize the lcd lcd.backlight(); lcd.setCursor(0,0); // column, row } void loop() { DcsBios::loop(); } I added the LiquidCrystal I2C library to a fresh install that had just the DCS-BIOS library added, and this compiles OK. Awesome, thanks! I'll give it a shot. Windows 10 ASRock Z370 Extreme4 LGA 1151 (300 Series) MOBO intel i7-8700k (Not overclocked) 16 GB Ram EVGA GeForce GTX 108ti SC Black Edition SSD Trackir
Kenpilot Posted March 14, 2023 Posted March 14, 2023 15 hours ago, No1sonuk said: I think I know the problem - I left some LED driver code in there. Sorry. Try this: #define DCSBIOS_IRQ_SERIAL #include "DcsBios.h" #include <Wire.h> #include <LiquidCrystal_I2C.h> LiquidCrystal_I2C lcd(0x27,20,2); // set the LCD address to 0x27 for a 20 chars and 2 line display // ***************** DCS-BIOS ****************** void onCmsp1Change(char* newValue) { lcd.setCursor(0,0); lcd.print(newValue); } DcsBios::StringBuffer<19> cmsp1Buffer(0x1000, onCmsp1Change); void onCmsp2Change(char* newValue) { lcd.setCursor(0,1); lcd.print(newValue); } DcsBios::StringBuffer<19> cmsp2Buffer(0x1014, onCmsp2Change); // *************************************************************** void setup() { DcsBios::setup(); lcd.init(); // initialize the lcd lcd.backlight(); lcd.setCursor(0,0); // column, row } void loop() { DcsBios::loop(); } I added the LiquidCrystal I2C library to a fresh install that had just the DCS-BIOS library added, and this compiles OK. I tired this and I'm getting this error: C:\Users\kenpi\Documents\Arduino\TEST_MIP_MEGA_13MAR2023\TEST_MIP_MEGA_13MAR2023.ino: In function 'void setup()': C:\Users\kenpi\Documents\Arduino\TEST_MIP_MEGA_13MAR2023\TEST_MIP_MEGA_13MAR2023.ino:85:5: error: 'class LiquidCrystal_I2C' has no member named 'init' lcd.init(); // initialize the lcd ^~~~ exit status 1 Compilation error: 'class LiquidCrystal_I2C' has no member named 'init' Windows 10 ASRock Z370 Extreme4 LGA 1151 (300 Series) MOBO intel i7-8700k (Not overclocked) 16 GB Ram EVGA GeForce GTX 108ti SC Black Edition SSD Trackir
Kenpilot Posted March 14, 2023 Posted March 14, 2023 Disregard, I got it working!! Thanks for the help!! 1 Windows 10 ASRock Z370 Extreme4 LGA 1151 (300 Series) MOBO intel i7-8700k (Not overclocked) 16 GB Ram EVGA GeForce GTX 108ti SC Black Edition SSD Trackir
milit Posted March 22, 2023 Posted March 22, 2023 Hi all! Please advise, how could I get the chaff/flare quantity for F/A-18c from DCS-BIOS? Thanks a lot! =WRAG=345 R7 5800X @ 4,8 GHz; DDR4 32Gb RAM (+32Gb swap); Radeon RX 6800 16Gb; 3840x2160; Oculus Quest 3; Win10-64
Recommended Posts