Jump to content

Marty62

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by Marty62

  1. Hi Folks I have built a replica keyboard modelled after the unit in the AH64. It uses a 20X1 LCD Display ( Make - Crystalfontz, Model CFAH2001B-TMI-ET, Revision B0 ) The display is driven by an Arduino Nano and the key buttons are driven through a Leo Bodinar 64 Button board I have managed to get the basic " Hello World " sketch working fine on the display but I need a bit of help with introducing the display reference code from the dcs bios reference document. My Basic Arduino Code is as below, which is producing the " hello world " and the counter code directly after the wording, that is working perfectly! Due to the fact that I am driving all the letter and number buttons on the keyboard via the Leo Bodinar board as a HID, I don't believe I need any other code from the DCS-BIOS reference other than the code for the display itself which is listed at the bottom of the page. I have attempted this myself and let me be clear " I am obviously not, code smart enough yet, but I am learning If someone could assist me with fitting the display code into my current working code, I would be eternally grateful Regards Martin BASIC WORKING CODE #define DCSBIOS_IRQ_SERIAL // include the library code: #include <LiquidCrystal.h> #include "DcsBios.h" // initialize the library by associating any needed LCD interface pin // with the arduino pin number it is connected to const int rs = 2, en = 3, d4 = 8, d5 = 9, d6 = 10, d7 = 13; LiquidCrystal lcd(rs, en, d4, d5, d6, d7); void setup() { // set up the LCD's number of columns and rows: lcd.begin(20, 1); // Print a message to the LCD. lcd.print("hello, world!"); } void loop() { // set the cursor to column 0, line 1 // (note: line 1 is the second row, since counting begins with 0): lcd.setCursor(15, 1); // print the number of seconds since reset: lcd.print(millis() / 1000); DcsBios::loop(); } MPORTED DCS-BIOS DISPLAY CODE void onPltKuDisplayChange(char* newValue) { /* your code here */ } DcsBios::StringBuffer<22> pltKuDisplayBuffer(AH_64D_PLT_KU_DISPLAY_A, onPltKuDisplayChange);
  2. Hi Folks I am in the process of building the left control console for AH64 and I am having issues with the warning lights. I am running a Leo Bodinar BU0836X switch controller which has all the switch and potentiometer from the console connected to it and this works fine as it is seen simply as a USB Joystick so to speak. I have an Arduino Nano set up to drive the leds that are mounted in the switches to show their status. The Nano is definitely connecting to DCS as it flashes as it should when in game and flying I initially tried using the direct code reference as sown on the first page with no success then added some additional code to try and set the required digital pins as outputs I think there are couple of issues here: 1. My Arduino Code is wrong ( most likely ) 2. I cannot use only the respective LED codes without the respective switch also being written into the code Would really appreciate some assistance in diagnosing my issue Regards Martin DCS-Bios Code.docx
×
×
  • Create New...