Start of the viggen panels, tips, tricks and alot of help is welcome

Both the data and the destination display are working now. It was harder than expected, since the displays need different libraries that dont work well together

1 Like

Nice a TM chip! I have a few TM 1638 chips that function as a input for a CIVA-IV. Lovely little chips with what you can do with them .

1 Like

It’s done :partying_face:

https://imgur.com/SsVCQMY
I’m pretty happy how it turned out, everything works (albeit the data display has a small delay) and setting up the buttons in DCS has been very easy. It shows up as a generic joystick, so it can be used in other games as well.

https://imgur.com/wJIN14r
20 cent for scale (lol), it really feels big

https://imgur.com/UKRwKeH
The panel itself

https://imgur.com/RF2hp3j
Some wiring, turned into a rat’s nest in the end…

In action:
https://imgur.com/LzLAj5Q

4 Likes

Very nice, @NukaBoy!
Well done!
I wish I could fit a full size Viggen pit… Would be so much fun to build it!

1 Like

Nice job @NukaBoy Was it hard doing coding for the leds? Did u get the boards for the led displays or did u custom made for them.

Update on my part is that i gave up on the analog value rotaryknob. I was having trouble finding the reason for it not working.
I found that it was not just to add that line from @outbaxx . i also had to edit the main dcs bios library.

Again i looked to the forums and found this which i guess is the same thing.

tekadept’s post was very helpful

Which tells that the DcsBios::AnalogMultiPos is not in the library and goes on to tell how to do it.

BUT! it kept on not working for me i kept looking in to it. testing the hardware maybe was wrong…
Went on “vaycay” xD … now i went back again to check and found out that the rotaryswitch had just gotten a loose pad on the center pin. But i also decided to just go with DCS.bios tip and do a Read low value on pin to know which is selected. So now i have 2 pins left on the micro :stuck_out_tongue: ^
Gonna get a new one and start work on the navpanel with the waypointselectors, and also the ledscreens will be connected to that micro.

I have been thinking on moving to the Leobodnar card for the rotaryswitch part, but gonna try the arduino way first to see than if it is too much of a hassle ill move too leobodnar for those.

So i tried the datapanel and it is working fine with this code :slight_smile:

#define DCSBIOS_DEFAULT_SERIAL

#include <Keypad.h>
#include “DcsBios.h”

/* paste code snippets from the reference documentation here */

DcsBios::Switch2Pos dataInOut(“DATA_IN_OUT”, A5, true); //set a pin for the in out switch

const byte datapanelSelectorPins[13] = {6, 7, 8, 9, 10, 11, 12};
DcsBios::SwitchMultiPos datapanelSelector(“DATAPANEL_SELECTOR”, datapanelSelectorPins, 13);

const byte ROWS = 3; //four rows
const byte COLS = 4; //three columns
char keys[ROWS][COLS] = {
{‘7’,‘4’,‘1’,‘0’},
{‘8’,‘5’,‘2’,‘A’},
{‘9’,‘6’,‘3’},

};
byte rowPins[ROWS] = {A3, A2, A4}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {2, 3, 4, 5}; //connect to the column pinouts of the keypad

Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );

void setup() {
DcsBios::setup();
keypad.addEventListener(keypadEvent); // Add an event listener.
keypad.setHoldTime(100); // Default is 1000mS
keypad.setDebounceTime(50); // Default is 50mS
Serial.begin(9600);
}

void loop() {
DcsBios::loop();
char key = keypad.getKey();
}

void keypadEvent(KeypadEvent KEY){
switch (keypad.getState()) { // gives PRESSED, HOLD or RELEASED
case PRESSED: // If someone finds a better solution as switch - case: Let me know, please :slight_smile:
switch(KEY) { // following commands are fired unique if PRESSED
//CDU
case ‘1’: sendDcsBiosMessage(“DATAPANEL_KEY_1”, “1”); break;
case ‘2’: sendDcsBiosMessage(“DATAPANEL_KEY_2”, “1”); break;
case ‘3’: sendDcsBiosMessage(“DATAPANEL_KEY_3”, “1”); break;
case ‘4’: sendDcsBiosMessage(“DATAPANEL_KEY_4”, “1”); break;
case ‘5’: sendDcsBiosMessage(“DATAPANEL_KEY_5”, “1”); break;
case ‘6’: sendDcsBiosMessage(“DATAPANEL_KEY_6”, “1”); break;
case ‘7’: sendDcsBiosMessage(“DATAPANEL_KEY_7”, “1”); break;
case ‘8’: sendDcsBiosMessage(“DATAPANEL_KEY_8”, “1”); break;
case ‘9’: sendDcsBiosMessage(“DATAPANEL_KEY_9”, “1”); break;
case ‘0’: sendDcsBiosMessage(“DATAPANEL_KEY_0”, “1”); break;
case ‘A’: sendDcsBiosMessage(“CK37_RENSA_CLEAR”, “1”); break;

}}

switch (keypad.getState()){  // gives PRESSED, HOLD or RELEASED

case RELEASED:
switch(KEY) { // Released KEYs or Neutral Rockers signal is sent
//CDU
case ‘1’: sendDcsBiosMessage(“DATAPANEL_KEY_1”, “0”); break;
case ‘2’: sendDcsBiosMessage(“DATAPANEL_KEY_2”, “0”); break;
case ‘3’: sendDcsBiosMessage(“DATAPANEL_KEY_3”, “0”); break;
case ‘4’: sendDcsBiosMessage(“DATAPANEL_KEY_4”, “0”); break;
case ‘5’: sendDcsBiosMessage(“DATAPANEL_KEY_5”, “0”); break;
case ‘6’: sendDcsBiosMessage(“DATAPANEL_KEY_6”, “0”); break;
case ‘7’: sendDcsBiosMessage(“DATAPANEL_KEY_7”, “0”); break;
case ‘8’: sendDcsBiosMessage(“DATAPANEL_KEY_8”, “0”); break;
case ‘9’: sendDcsBiosMessage(“DATAPANEL_KEY_9”, “0”); break;
case ‘0’: sendDcsBiosMessage(“DATAPANEL_KEY_0”, “0”); break;
case ‘A’: sendDcsBiosMessage(“CK37_RENSA_CLEAR”, “0”); break;

}}
}

2 Likes

I looked for ready-made LEDs with boards since i didnt need any special size or form

Really nice! How did you make that throttle?

2 Likes

How did you guys manage to make those well-looking buttons and switch?