Jump to content

DimitrisT

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by DimitrisT

  1. I see.. Thanks a lot buddy!!!
  2. Hello GrafRotz, thanks for the reply, maybe you are right, but if I open the hello world sketch and change the words to UHF 305.00 SPTP @ 1, they fit ok. Maybe the dcs bios translates characters differently . Thanks again.
  3. Hello, happy new year to everyone. I manage to build and connect the landing gear panel to an arduino Mega. Everything worked ok via dcs bios. So I need to represent the DED screen with lcd 20x4 I2c adapter. With this sketch I manage to see the DED on the screen but I lost one line (the number of the waypoint). How can I add the other lines so i can see it in proper order? Thanks in advance /* Tell DCS-BIOS to use a serial connection and use interrupt-driven communication. The main program will be interrupted to prioritize processing incoming data. This should work on any Arduino that has an ATMega328 controller (Uno, Pro Mini, many others). */ #define DCSBIOS_IRQ_SERIAL #include "DcsBios.h" #include <Wire.h> #include <LiquidCrystal_I2C.h> DcsBios::IntegerBuffer rfSwBuffer(0x4430, 0x1800, 0, 2); DcsBios::Switch3Pos rfSw("RF_SW", 2, 3); DcsBios::Switch2Pos laserArmSw("LASER_ARM_SW", 4); DcsBios::IntegerBuffer masterArmSwBuffer(0x4424, 0x0030, 0, 2); DcsBios::Switch3Pos masterArmSw("MASTER_ARM_SW", 5, 6); DcsBios::Switch2Pos advModeSw("ADV_MODE_SW", 7); DcsBios::IntegerBuffer apRollSwBuffer(0x4400, 0x0c00, 0, 2); DcsBios::Switch3Pos apRollSw("AP_ROLL_SW", 8, 9); DcsBios::IntegerBuffer apPitchSwBuffer(0x4400, 0x0300, 0, 2); DcsBios::Switch3Pos apPitchSw("AP_PITCH_SW", 10, 11); DcsBios::Switch2Pos emergStroreJett("EMERG_STRORE_JETT", 12); DcsBios::Switch2Pos gndJettEnableSw("GND_JETT_ENABLE_SW", A1); DcsBios::Switch2Pos brakeChanSw("BRAKE_CHAN_SW", A2); DcsBios::Switch3Pos antiSkidSw("ANTI_SKID_SW", A3, A4); DcsBios::Switch2Pos storesConfigSw("STORES_CONFIG_SW", A5); DcsBios::Switch3Pos landTaxiLightSw("LAND_TAXI_LIGHT_SW", A8, A9); DcsBios::LED lightGearN(0x4474, 0x0200, 13); DcsBios::LED lightGearL(0x4474, 0x0400, 13); DcsBios::LED lightGearR(0x4474, 0x0800, 13); DcsBios::Switch2Pos gearHandle("GEAR_HANDLE", A10); // Set the LCD address to 0x27 for a 20 chars and 4 line display LiquidCrystal_I2C lcd(0x27, 20, 4); void onDedLine1Change(char* newValue) { // initialize the LCD lcd.begin(); lcd.setCursor(0, 0); lcd.backlight(); lcd.setCursor(0, 0); lcd.print(newValue); } DcsBios::StringBuffer<25> dedLine1Buffer(0x44fc, onDedLine1Change); void setup() { DcsBios::setup(); } void loop() { DcsBios::loop(); }
×
×
  • Create New...