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:
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?