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();
}