Jump to content

Recommended Posts

Posted

Hi simers and pitbuilders,

 

i try to build only a small part of the KA 50 cockpit (only the targeting mode control panel) to gain experience. The toggle switches work fine, the rotary switch work also fine but the illuminated buttons do not work.

 

If i push the real life button the button in DCS start to flicker. The real life LED lit all the time, no matter if i push the button or not.

 

Im not experienced in programming or electronics so i ask for help.

 

Here is the code i use:

 

DcsBios::Switch2Pos weaponsGroundTargetBtn("WEAPONS_GROUND_TARGET_BTN", 0);

DcsBios::LED weaponsGroundTargetLed(0x1916, 0x0800, 1);

Here is a picture of the circuit:

SchaltungBTN.jpg.ab18f4b8a6b749b38caa62f2f0abd529.jpg

Posted
Hi simers and pitbuilders,

 

i try to build only a small part of the KA 50 cockpit (only the targeting mode control panel) to gain experience. The toggle switches work fine, the rotary switch work also fine but the illuminated buttons do not work.

 

If i push the real life button the button in DCS start to flicker. The real life LED lit all the time, no matter if i push the button or not.

 

Im not experienced in programming or electronics so i ask for help.

 

Here is the code i use:

 

Here is a picture of the circuit:

 

The 2 pins you chose are comm pins and cannot be used as you have done.

 

Change the pins you are using... Pin 12 for the switch and pin13 for the LED. Do not wire the built in led directly to the Pin. You should have a 220 ohm resistor between the pin and the LED or you can damage the Uno. Try that out and see what happens.

 

Btw, when you post code, please post the entire sketch. 2 lines of code are not enough to diagnose a problem.

 

Let me know how that works.

Regards

John W

aka WarHog.

 

My Cockpit Build Pictures...



John Wall

 

My Arduino Sketches ... https://drive.google.com/drive/folders/1-Dc0Wd9C5l3uY-cPj1iQD3iAEHY6EuHg?usp=sharing

 

 

WIN 10 Pro, i8-8700k @ 5.0ghz, ASUS Maximus x Code, 16GB Corsair Dominator Platinum Ram,



AIO Water Cooler, M.2 512GB NVMe,

500gb SSD, EVGA GTX 1080 ti (11gb), Sony 65” 4K Display

VPC MongoosT-50, TM Warthog Throttle, TRK IR 5.0, Slaw Viper Pedals

Posted

Thank you very much for your reply.

 

I ordered a bunch of 220 ohm resistors and i will test the new wiring soon.

 

Sorry for my isolated part of the code, will not happen again :thumbup:

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...