Jump to content

OLED Display and Arduino Sketch Help Please


Kenpilot

Recommended Posts

I have an OLED display for the Chaff and Flare counter on the A10C Counter measures panel on the main instrument panel. Is anyone else using this setup with an arduino and have a sketch I could use? I thought DCS Bios would have it but apparently it doesn't. Thanks! 

Windows 10

ASRock Z370 Extreme4 LGA 1151 (300 Series) MOBO

intel i7-8700k (Not overclocked)

16 GB Ram

EVGA GeForce GTX 108ti SC Black Edition

SSD

Trackir

Link to comment
Share on other sites

Hi Kenpilot,

If you mean the display on the Main Panel, you have to look for the CMSC within the control reference.

There are 3 messages to display (C/F Amount, JMR status and MWS status).

What type of OLED display do you want to use?
Are you able to display some plain text from a library example?

Regards, Vinc

Regards, Vinc

real life: Royal Bavarian Airforce

online: VJS-GermanKnights.de

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

Awesome, thanks so much guys. Unfortunately I won't be at my simpit and computer for a little bit to be able to test everything out. I was supposed to be working on it when I posted this but got pulled away for stupid work. Damn adulting. 

Windows 10

ASRock Z370 Extreme4 LGA 1151 (300 Series) MOBO

intel i7-8700k (Not overclocked)

16 GB Ram

EVGA GeForce GTX 108ti SC Black Edition

SSD

Trackir

Link to comment
Share on other sites

  • 1 month later...

OK guys, I'm finally working on getting my OLED display up and running with arduino and the CMSC Panel for the A10C. I tried Rapti's sketch but I got an error code that says "OLedI2C.h: No such file or directory". Any idea what this means or how to fix it? Or does anyone else have a sketch I can try for what I'm trying to do? This is the OLED display I'm using:

https://www.ebay.com/itm/165013228347?hash=item266b8e0b3b:g:EWQAAOxy4t1SmHym

IIC / I2C 2002 20x02 OLED Module Display - For Arduino / PIC / AVR / ARM

 

Windows 10

ASRock Z370 Extreme4 LGA 1151 (300 Series) MOBO

intel i7-8700k (Not overclocked)

16 GB Ram

EVGA GeForce GTX 108ti SC Black Edition

SSD

Trackir

Link to comment
Share on other sites

I figured out what the error code meant and I found a library with the file OLedI2C.h and installed it. I still need a sketch though to work with DCS BIOS and the A10C CMSC panel. I tried Rapti's and No1sonuk. I was able to upload both on to the arduino but nothing is being displayed on my OLED. I double checked my wiring and it's correct, with SCL connected to SCL and SDA connected to SDA on the UNO and VCC to 5volt and GND to GND. Does anyone know why nothing is being displayed? Or maybe have a different sketch for the specific OLED I have, which is listed above?


Edited by Kenpilot

Windows 10

ASRock Z370 Extreme4 LGA 1151 (300 Series) MOBO

intel i7-8700k (Not overclocked)

16 GB Ram

EVGA GeForce GTX 108ti SC Black Edition

SSD

Trackir

Link to comment
Share on other sites

Thanks guys. I actually was able to find a library with the OLED file and found a sketch in the forums that worked!! Thanks again for offering to help, it's much appreciated!! 

  • Like 1

Windows 10

ASRock Z370 Extreme4 LGA 1151 (300 Series) MOBO

intel i7-8700k (Not overclocked)

16 GB Ram

EVGA GeForce GTX 108ti SC Black Edition

SSD

Trackir

Link to comment
Share on other sites

  • 4 weeks later...

Ken, can you link to the file & the sketch that solved your problems?  I'm getting ready to make this panel and if I run into the same issue, I'd like to try your solution.

Thanks,

Darin - a.k.a. Hookah


Edited by Hookah
miss-spelled
Link to comment
Share on other sites

9 hours ago, Hookah said:

Ken, can you link to the file & the sketch that solved your problems?  I'm getting ready to make this panel and if I run into the same issue, I'd like to try your solution.

Thanks,

Darin - a.k.a. Hookah

 

Hey Darin, here is the sketch that I'm using that fixed my problem:

 

//https://github.com/gadjet/1602-OLED-Arduino-Library/blob/master/OLedI2C.h
void onCmscTxtChaffFlareChange(char* newValue) {
      LCD.sendString(newValue,12,0);  //Now includes the cursor position data (col, row)
}
DcsBios::StringBuffer<8> cmscTxtChaffFlareBuffer(0x108e, onCmscTxtChaffFlareChange);

void onCmscTxtJmrChange(char* newValue) {
      LCD.sendString(newValue,0,0); 
}
DcsBios::StringBuffer<8> cmscTxtJmrBuffer(0x1096, onCmscTxtJmrChange);

void onCmscTxtMwsChange(char* newValue) {
      LCD.sendString(newValue,0,1); 
}
DcsBios::StringBuffer<8> cmscTxtMwsBuffer(0x12b0, onCmscTxtMwsChange);

void onCmscBrtChange(unsigned int newValue) {
    LCD.setContrast(newValue/257);
}
DcsBios::IntegerBuffer cmscBrtBuffer(0x10ea, 0xffff, 0, onCmscBrtChange);

 

 

Windows 10

ASRock Z370 Extreme4 LGA 1151 (300 Series) MOBO

intel i7-8700k (Not overclocked)

16 GB Ram

EVGA GeForce GTX 108ti SC Black Edition

SSD

Trackir

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...