Slammansam Posted December 30, 2022 Posted December 30, 2022 Hi, I'm very new to this whole situation and I am struggling to make my new 8 way rotary switch (SP8T) have any function. I am attempting to use this switch for the INS knob on the F-16 Avionics Panel. I have the center pin wired to ground on an Arduino mega and pins 1-7 wired to digital pins 22, 24, 26, 28, 30, 32 and 34. This is the code I am currently using, I have had to add a ";" following "const byte insKnbPins[13] = {22, 24, 26, 28, 30, 32, 34}" as the code failed to compile without it. When I turn the switch nothing happens, the tx light doesn't blink like it does for the other switches. I am sure I have made some idiotic beginners mistake and am looking for some guidance, thank you for any help. /* 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" /* paste code snippets from the reference documentation here */ const byte insKnbPins[13] = {22, 24, 26, 28, 30, 32, 34}; DcsBios::SwitchMultiPos insKnb("INS_KNB", insKnbPins, 13); void setup() { DcsBios::setup(); } void loop() { DcsBios::loop(); }
crash test pilot Posted December 30, 2022 Posted December 30, 2022 2 minutes ago, crash test pilot said: Stupid Pic ate my text. So here we go again: Are you using the (no longer maintained) hub version? The flightpanel fork gets constant updates. Hub contained several mistakes and errors like missing semikolons and wrong numbers. Correct syntax for ins knob is like the pic above.
No1sonuk Posted December 31, 2022 Posted December 31, 2022 7 hours ago, crash test pilot said: Are you using the (no longer maintained) hub version? The flightpanel fork gets constant updates. Hub contained several mistakes and errors like missing semikolons and wrong numbers. Correct syntax for ins knob is like the pic above. I just looked at the Hub control ref - it has the [13] in it.
crash test pilot Posted December 31, 2022 Posted December 31, 2022 10 hours ago, No1sonuk said: I just looked at the Hub control ref - it has the [13] in it. Thought so - the ins knob does not have 13 positions... 1
Slammansam Posted January 3, 2023 Author Posted January 3, 2023 Thank you, that solved my issue, one more question though. When I go to launch the flight panels app for DCS bios from chrome, it warns me that I will no longer be able to open apps from chrome after December 2022. So far nothing has changed even though it is January 2023 I just hope my controls wont studently become useless due to an update.
No1sonuk Posted January 3, 2023 Posted January 3, 2023 (edited) It's not the controls that will stop working, it's that app which shows the data that is going to be unavailable. IIRC, someone has crated an alternative for that. Edited January 3, 2023 by No1sonuk
Slammansam Posted January 20, 2023 Author Posted January 20, 2023 (edited) Just for anyone wondering, here is the DCS BIOS Interface alternative now that chrome apps are not supported. Edited January 27, 2023 by Slammansam Clarification 1
Recommended Posts