Hornet UFC (potentially) - Page 35 - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 11-09-2019, 07:13 PM   #341
flx54
Junior Member
 
Join Date: Dec 2018
Posts: 27
Default

Hi Ian,


thanks for your input and useful hints. I already found "display1" in the hornet section with which i want to start testing. I guess there is not much more for me to do, than spending more time with it and understanding the logic. I think, that this is going to work well as winter nights are very long...
__________________
DCS Open beta
F/A-18C, A-10C

Win10, i7-8700k, AsRock Z370 Extreme 4, GTX1080Ti, 32" 2K Samsung TFT Main screen, 22" 1K Iiyama Touch screen.

Warthog HOTAS
flx54 is offline   Reply With Quote
Old 11-09-2019, 07:35 PM   #342
longuich
Junior Member
 
Join Date: May 2019
Location: The Neverlands
Posts: 41
Default

Jan, would you be open to centralize documentation and examples ?

I for one would love to be able to go to a single place to find info on dcs-bios and *uino code instead of having to scour the interwebs and ending up reluctantly asking you about something.

~michel

Quote:
Originally Posted by [FSF]Ian View Post
If you can, spend about $100 on a decent temperature-controlled soldering station (Hakko FX-888 or similar). For peace of mind, make sure it has an auto-power-off feature.



If you have to use a cheap "starter kit" iron without temperature control (definitely possible, I used one for a few years), make sure to avoid lead-free solder. The cheap irons will not match the higher melting point for the lead-free stuff, and while you can still make working lead-free solder joints with one, it is an exercise in frustration.



...


I have one more feature I want to add to the DCS-BIOS Hub; after that, I want to take some time to focus on bug fixes, some user interface design, and most importantly improve the documentation. Any advice on how I can make this complex topic easier to approach for complete beginners is appreciated.





Sent from my iPhone using Tapatalk
longuich is offline   Reply With Quote
Old 11-09-2019, 07:48 PM   #343
Fusedspine33
Member
 
Join Date: Jun 2017
Posts: 248
Default

(FSF)Ian,

Wow, thanks for jumping in here, honored for your response. The question of “how do I” is a much better way of approaching a challenge. Some of the challenges to mimicking the UFC is a lack of readily available components, such as the scratch pad with a single line of 13 digits and the colon display which extends to 5 digits. Ready made components like the adafruit seem to have 1 or 4 digits packaged with a controller chip. The adafruit design offer selectable i2c addresses enabling the use of 1 Arduino to control the displays but no ability to display the colon.


The display used by teacypher doesn’t have selectable i2c addresses and his post made me aware there was an 12c multiplexer even available. I thought I was going to have to use a single Arduino per display. Not very efficient. Teacyphers approach is much more efficient. Now it is making it work. The displays he chose are:

https://www.ebay.com/itm/0-91-128x32...72.m2749.l2649

They are relatively inexpensive and if displayed behind green plexiglass should look acceptable.

For the scratchpad it’s learning how to create a controller for 13 digits as a single line. How do I? Still remains an open question.

After watching a bunch of soldering videos I went with a Weller temperature adjustable station. Much more comfortable to use than the cheap one I had before.





Quote:
Originally Posted by [FSF]Ian View Post
If you can, spend about $100 on a decent temperature-controlled soldering station (Hakko FX-888 or similar). For peace of mind, make sure it has an auto-power-off feature.

If you have to use a cheap "starter kit" iron without temperature control (definitely possible, I used one for a few years), make sure to avoid lead-free solder. The cheap irons will not match the higher melting point for the lead-free stuff, and while you can still make working lead-free solder joints with one, it is an exercise in frustration.



You can write your Arduino sketch in such a way that different string values go to the same display. How exactly you do this depends on the exact display and Arduino library used.

One method is the one shown in the tutorial video on LCDs. In the on...Changed() function, the first command sets the cursor of the display to the start position and the second one writes the newValue to the display.
This works well for displays that support a partial update.

A slightly different method should be used if your display can only update everything at once. In that case, remove the on...Changed functions from the code snippets and replace them with NULL in the parameter list to the StringBuffer so you'd end up with something like this:
Code:
DcsBios::StringBuffer<1> ufcOptionCueing1Buffer(0x7428);
DcsBios::StringBuffer<4> ufcOptionDisplay1Buffer(0x7432, NULL);
In this mode, the StringBuffer will not call a function when the data changes. You can check it instead from your main loop() like this:
Code:
if (ufcOptionCueing1Buffer.hasUpdatedData() || ufcOption1DisplayBuffer.hasUpdatedData()) {
  // one of the two values has changed
  // write both values to the display and update; pseudo-code, adapt to whatever display library you are using
  myDisplay.setCursor(12, 20); // some position
  myDisplay.print(ufcOptionCueing1Buffer.getData());
  myDisplay.print(ufcOptionDisplay1Buffer.getData());
  myDisplay.update();
}
In general, a lot of people seem to ask "can you do X with DCS-BIOS?", to which the answer is almost always "yes, as long as you write some Arduino code". I wonder what kind of documentation I need to add to make people ask "How do I" instead of "Can I do".
I cannot add snippets to cover every possible use case (even if I had the time, the sheer amount of snippets would overwhelm a newbie).
I have one more feature I want to add to the DCS-BIOS Hub; after that, I want to take some time to focus on bug fixes, some user interface design, and most importantly improve the documentation. Any advice on how I can make this complex topic easier to approach for complete beginners is appreciated.

Last edited by Fusedspine33; 11-09-2019 at 07:50 PM.
Fusedspine33 is offline   Reply With Quote
Old 11-10-2019, 12:16 PM   #344
flx54
Junior Member
 
Join Date: Dec 2018
Posts: 27
Default

OK, i think i messed up. Trying to clean up the libraries even after uninstalling the IDE. Cant include dcs-bios.h as it is already installed somewhere else. I need to check for a clean uninstall before continuing i guess.
Whats the best option to include the library for DCS BIOS? Add the zip or place the uncompressed folder into the library folder of the IDE?
__________________
DCS Open beta
F/A-18C, A-10C

Win10, i7-8700k, AsRock Z370 Extreme 4, GTX1080Ti, 32" 2K Samsung TFT Main screen, 22" 1K Iiyama Touch screen.

Warthog HOTAS

Last edited by flx54; 11-10-2019 at 12:42 PM.
flx54 is offline   Reply With Quote
Old 11-10-2019, 02:26 PM   #345
flx54
Junior Member
 
Join Date: Dec 2018
Posts: 27
Default

UPDATE:

BIG SUCCESS !!!

I managed to get Display 1 of the UFC to show correctly on the 4 digit 14-segment display using this code. (Nothing special for (FSF)Jan (THX A LOT !!!) but i guess but thought i´d share with you)

Code:
// include Adafruit LED Backpack library
#include <Wire.h>
#include <Adafruit_GFX.h>
#include "Adafruit_LEDBackpack.h"

// include DCS-BIOS Arduino library
#define DCSBIOS_IRQ_SERIAL
#include "DcsBios.h"

// display instance
Adafruit_AlphaNum4 alpha4 = Adafruit_AlphaNum4();


void onufcOptionDisplay1Change(char* newValue) {
  
  alpha4.writeDigitAscii(0, newValue[0]);
  alpha4.writeDigitAscii(1, newValue[1]);
  alpha4.writeDigitAscii(2, newValue[2]);
  alpha4.writeDigitAscii(3, newValue[3]);
  alpha4.writeDisplay();
}
DcsBios::StringBuffer<4> ufcOptionDisplay1Buffer(0x7432, onufcOptionDisplay1Change);



void setup() {
   // initialize display
  alpha4.begin(0x70);

  // write something to the display
  // so you see something before data is received
  alpha4.writeDigitAscii(0, 'A');
  alpha4.writeDigitAscii(1, 'B');
  alpha4.writeDigitAscii(2, 'C');
  alpha4.writeDigitAscii(3, 'D');
  alpha4.writeDisplay();
  
  DcsBios::setup();
}

void loop() {
  DcsBios::loop();
}
For Connection i used this reference:

https://pinout.xyz/pinout/four_letter_phat

Pin A4 is used for DATA
Pin A5 is used for CLOCK


Now i dont know whether the colon in front of the symbols needs a fifth digit or could be adressed separately?!
__________________
DCS Open beta
F/A-18C, A-10C

Win10, i7-8700k, AsRock Z370 Extreme 4, GTX1080Ti, 32" 2K Samsung TFT Main screen, 22" 1K Iiyama Touch screen.

Warthog HOTAS

Last edited by flx54; 11-10-2019 at 03:27 PM.
flx54 is offline   Reply With Quote
Old 11-11-2019, 07:09 PM   #346
SkyJunky
Member
 
SkyJunky's Avatar
 
Join Date: Sep 2018
Posts: 171
Default

Hey everyone,

I hope it is ok that i show my version here. I followed the discussion about the displays.
This is my UFC with displays. This is an early version. I have not yet the finished version on video. The video is enough to show that it works with OLED displays
Only the Comm channel displays are wip. The code for DCS is not ready, the Comm displays are working without DCS.

The early version:


I have used 2.23 OELD Displays in white. The green color was made with foil.

BR Sky
Attached Thumbnails
Click image for larger version

Name:	0CF2D833-506A-45AB-A307-E4A773791C02.jpeg
Views:	60
Size:	3.29 MB
ID:	220947  

Last edited by SkyJunky; 11-11-2019 at 07:13 PM.
SkyJunky is offline   Reply With Quote
Old 11-11-2019, 07:18 PM   #347
Gotwake
Junior Member
 
Join Date: Oct 2017
Location: Alberta
Posts: 55
Default

Damn sky, that looks awesome!!!!

Sent from my SM-G930W8 using Tapatalk
Gotwake is offline   Reply With Quote
Old 11-11-2019, 11:04 PM   #348
TWC_Alamo
Member
 
TWC_Alamo's Avatar
 
Join Date: Jun 2015
Location: Denver, CO
Posts: 126
Default

Ian,


First off thanks for all the work on DCS BIOS and your patience in answering so many beginners' questions. I have learning to take advantage of DCS BIOS in my cockpit building on my "todo" list for 2020.

Have you thought about using an approach similar to what Sim Innovations' (https://www.siminnovations.com/) uses for their Air Manager program? It is wiki based and makes it extremely easy for beginners to access the information they need to build custom panels and instruments.

Sim Innovations' YouTube channel has several tutorials showing how to use their wiki to program instruments and panels. For example this particular one shows programing seven segment displays. https://www.youtube.com/watch?v=nBtCsm4FIjg


Quote:
Originally Posted by [FSF]Ian View Post

In general, a lot of people seem to ask "can you do X with DCS-BIOS?", to which the answer is almost always "yes, as long as you write some Arduino code". I wonder what kind of documentation I need to add to make people ask "How do I" instead of "Can I do".
I cannot add snippets to cover every possible use case (even if I had the time, the sheer amount of snippets would overwhelm a newbie).
I have one more feature I want to add to the DCS-BIOS Hub; after that, I want to take some time to focus on bug fixes, some user interface design, and most importantly improve the documentation. Any advice on how I can make this complex topic easier to approach for complete beginners is appreciated.
__________________

TWC_Alamo
Denver, CO

Military Flight Sim
I7-7700K, 4.9 GHz, Z270-Gaming MB, 16GB, 512GB EVO-960 NVMe M.2, 512GB WD Black NVMe M.2, 1 TB SSD Raid, EVGA RTX 2080ti, Samsung Odyssey Plus, TM HOTAS/MFDs, MFG Crosswinds, Gametrix 908 JetSeat

GA Flight Sim
I7-5820K, 4.2Ghz, Godlike Carbon MB, 16GB, 512 GB EVO 960 NVME M.2, 2 X SSD, EVGA 1080ti, HTC Vive, 3 X 4K 55" TVs, 4 X 27" Monitors, CH: Flight Yoke, Throttle Quadrant, Rudder Pedals
TWC_Alamo is offline   Reply With Quote
Old 11-12-2019, 02:37 AM   #349
Fusedspine33
Member
 
Join Date: Jun 2017
Posts: 248
Default

Thanks for sharing your work. Would you mind sharing your parts list? Thanks

Quote:
Originally Posted by SkyJunky View Post
Hey everyone,

I hope it is ok that i show my version here. I followed the discussion about the displays.
This is my UFC with displays. This is an early version. I have not yet the finished version on video. The video is enough to show that it works with OLED displays
Only the Comm channel displays are wip. The code for DCS is not ready, the Comm displays are working without DCS.

The early version:


I have used 2.23 OELD Displays in white. The green color was made with foil.

BR Sky
Fusedspine33 is offline   Reply With Quote
Old 11-12-2019, 10:30 AM   #350
Brun
Member
 
Join Date: Nov 2004
Location: London Town
Posts: 281
Default

Amazing to see what people are doing with the displays. Never even imagined this when I started it last year.
Brun is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 09:42 PM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.