Jump to content

Recommended Posts

Hi guys, I'm building the pilot control panel for the ARC159 in the F- 14.  This is my first panel for my F-14 simpit and I'm having trouble putting together a sketch for displaying the frequency on a 7 segment display.  I have an arduino uno and a TM1637 6 digit 7 segment display.  Unfortunately, I have zero coding knowledge.  I've downloaded IDE, DCS BIOS, and several libraries for the tm1637.  I've spent several days trying to paste together a sketch, but no joy.  Doe anyone have a sketch that that they could share?  Thanks

Link to post
Share on other sites

Here's the code I came up with based on Vlad's A10c code

 

  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 "TM1637TinyDisplay6.h"
#include "DcsBios.h"

#define CLK 3
#define DIO 4

TM1637TinyDisplay6 PltUhf(CLK, DIO); // 6-Digit Display Class

void onPltUhf1110DialChange(unsigned int newValue) {
     PltUhf.showString(newValue, 1, 0);    
}
DcsBios::IntegerBuffer pltUhf1110DialBuffer(0x1240, 0x0003, 0, onPltUhf1110DialChange);

void onPltUhf11DialChange(unsigned int newValue) {
   int x=newValue;
   PltUhf.showNumber(x, true,1, 2);
}
DcsBios::IntegerBuffer pltUhf11DialBuffer(0x1240, 0x000c, 2, onPltUhf11DialChange);
 
 void onPltUhf101DialChange(unsigned int newValue) {
     int x=newValue;
  PltUhf.showNumber(x, true,1, 3);
}
DcsBios::IntegerBuffer pltUhf101DialBuffer(0x1240, 0x0030, 4, onPltUhf101DialChange);

void onPltUhf1025DialChange(unsigned int newValue) {
  PltUhf.showString(newValue,2, 4);
}
DcsBios::IntegerBuffer pltUhf1025DialBuffer(0x1240, 0x00c0, 6, onPltUhf1025DialChange);


 
void setup()
{
    DcsBios::setup();
    PltUhf.clear();
    PltUhf.setBrightness(10);
}
void loop() {
  DcsBios::loop();
}

 

 

Here's what read on the display:

image.pngimage.png

I know it's not right, but to me it's progress.  At least something came up on the display.  Can anybody show me where I'm going wrong?

Link to post
Share on other sites
Sorry, my code doesn't work for you. The A-10 does it differently. The F-14 does not have the ability to display the frequency one digit at a time, but only on a common line. My code on 3rd and 4th digits works correctly, only it outputs switch position 0, 1 and 2 (1 is middle position)
Can you use these lines?

PILOT Dial 3 ARC-159 Frequency

PILOT Dial 4 ARC-159 Frequency

PILOT High ARC-159 Frequency

 

Link to post
Share on other sites

Hello, I have mainly tried with the Huey radios but once I tried the F-14 and something similar happened, I attributed it to an error in the bios code. The radio didn't work at first, but when I switched to the RIO station and used theirs, it worked. It seems that the codes of the RIO and Piloto radios were wrong

 

F14 RIO radio

Link to post
Share on other sites
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...