Pavespawn Posted February 11, 2018 Posted February 11, 2018 Guys, I have the below LCD, and an Uno. I am trying to make it work but I can’t even get it to display. I uploaded a sketch just fine but I get no display. Am I missing a component? A backpack? I have successfully used Arduinos to get switches to work but this is my first lcd. Thanks for the help. Gary
Hansolo Posted February 11, 2018 Posted February 11, 2018 Hi Gary I am not home but will be in 8 hours. I got mine working and can upload my sketch. You should need anything special apart from correct wiring and correct sketch. I'll get back to you later unless someone beats me to it Cheers Hans 132nd Virtual Wing homepage & 132nd Virtual Wing YouTube channel My DCS-BIOS sketches & Cockpit Album
Pavespawn Posted February 11, 2018 Author Posted February 11, 2018 Thanks! I’m following your example but I will admit I don’t know what I’m doing. I can get the arduino monitor to recognize the lcd but can’t get anything to display.
Hansolo Posted February 11, 2018 Posted February 11, 2018 My example? Which one to be precise? 132nd Virtual Wing homepage & 132nd Virtual Wing YouTube channel My DCS-BIOS sketches & Cockpit Album
Pavespawn Posted February 11, 2018 Author Posted February 11, 2018 My example? Which one to be precise? Sorry, I mean your RS485 with the MAX487 chips. I have all that in order but I am not feeling confident if I can’t even get this screen to light up. Lol.
Hansolo Posted February 11, 2018 Posted February 11, 2018 Alright lets start with getting the display online. First of all you need to wire it correctly. In the pictures you posted there isn't any wires on but they Display Uno Vcc 5V GND GND SCL A5 (SCL) SDA A4 (SDA) Since you can compile I assume that you have the OLED library installed? This code should work; /* Tell DCS-BIOS to use a serial connection and use the default Arduino Serial library. This will work on the vast majority of Arduino-compatible boards, but you can get corrupted data if you have too many or too slow outputs (e.g. when you have multiple character displays), because the receive buffer can fill up if the sketch spends too much time updating them. If you can, use the IRQ Serial connection instead. */ #define DCSBIOS_DEFAULT_SERIAL #include "DcsBios.h" #include "Wire.h" #include "OLedI2C.h" OLedI2C LCD; /* paste code snippets from the reference documentation here */ void onCmsp1Change(char* newValue) { LCD.sendString(newValue, 0, 0); } DcsBios::StringBuffer<19> cmsp1Buffer(0x1000, onCmsp1Change); void onCmsp2Change(char* newValue) { LCD.sendString(newValue, 0, 1); } DcsBios::StringBuffer<19> cmsp2Buffer(0x1014, onCmsp2Change); void setup() { DcsBios::setup(); Wire.begin(); LCD.init(); } void loop() { DcsBios::loop(); } I can get the arduino monitor to recognize the lcd but can’t get anything to display. I don't really understand this. Are you talking Serial Monitor? As for the RS485 I can't help you at the moment as I am waiting for parts to figure out why I can't get a second Mega running as Master. Cheers Hans 1 132nd Virtual Wing homepage & 132nd Virtual Wing YouTube channel My DCS-BIOS sketches & Cockpit Album
Pavespawn Posted February 11, 2018 Author Posted February 11, 2018 Since you can compile I assume that you have the OLED library installed? :doh: I used the led library. That is probably my first mistake (besides thinking that I could figure this out). I'll find the OLED library and use that. I don't really understand this. Are you talking Serial Monitor? Yes I was able to get the address of 0x3c. I appreciate the help and hopefully this helps someone who is like me and has never attempted anything like this before.
Hansolo Posted February 11, 2018 Posted February 11, 2018 This may the library; https://github.com/gadjet/1602-OLED-Arduino-Library Cheers Hans 132nd Virtual Wing homepage & 132nd Virtual Wing YouTube channel My DCS-BIOS sketches & Cockpit Album
Pavespawn Posted February 11, 2018 Author Posted February 11, 2018 You are my hero! Now I have to figure out comm ports because my fuel panel stopped working when this started!
lesthegrngo Posted June 3, 2019 Posted June 3, 2019 (edited) Hans, I have a 16 x 2 character LCD display driven by a PCF8574T board at the back, and just tried your sketch to no avail. Do I need to use a different library for that, the connections you state above are the same (using Arduino Uno) Cheers Les Edited June 3, 2019 by lesthegrngo
Hansolo Posted June 7, 2019 Posted June 7, 2019 I actually wouldn't know Les, but from the looks of this it does look like it needs a different board; http://forum.hobbycomponents.com/viewtopic.php?t=2189 Cheer Hans 132nd Virtual Wing homepage & 132nd Virtual Wing YouTube channel My DCS-BIOS sketches & Cockpit Album
lesthegrngo Posted June 9, 2019 Posted June 9, 2019 Thanks, Hans. I'm scouring the net for some step by step tutorials to try and teach myself the basics for these types of sketches, I feel embarrassed at having to ask such basic questions! Cheers Les
lesthegrngo Posted June 10, 2019 Posted June 10, 2019 I'm very pleased to report that I got one of my two 16 x LCD modules working great with DCS BIOS. One is a simple 1602A LCD module with the 16 pin output at the top, the other is the same module but with the PCF8574T 'backpack' module attached. The one without the backpack module is the one that I have working, so paradoxically the one with the extra to simplify it actually does the reverse! Nevertheless, I am quite pleased with myself that I have got the TACAN, ILS, CMSC and CMSP all working great with the simple LCD module! As the LCD modules are cheap, it isn't worth the bother to try with the other module, I'll just get a load of the 1602A modules and run with that. Now a really stupid question - why are the orange, green and red 602A modules all three times the price of the blue ones....? Cheers Les
Vinc_Vega Posted June 12, 2019 Posted June 12, 2019 (edited) Did you try the LiquidCrystal_I2C library to talk to the PCF Chip? Edited June 12, 2019 by Vinc_Vega Regards, Vinc real life: Royal Bavarian Airforce online: VJS-GermanKnights.de [sIGPIC][/sIGPIC]
lesthegrngo Posted June 13, 2019 Posted June 13, 2019 I'm pretty sure I did, but will try it anyway just to be certain thanks Les
lesthegrngo Posted June 16, 2019 Posted June 16, 2019 Well, I might be struggling with the RS485 setup, but I managed to figure this out. I downloaded the LiquidCrystal_PCF8574 library, and after playing around with it for a while I have managed to get it working For anyone with one of these LCD modules with the PCF8574 backpack, this is the sketch I managed to get working #include <Wire.h> #include <LiquidCrystal_PCF8574.h> #define DCSBIOS_IRQ_SERIAL #include <DcsBios.h> LiquidCrystal_PCF8574 lcd(0x27); // set the LCD address to 0x27 for a 16 chars and 2 line display int show; void onCmscTxtJmrChange(char* newValue) { lcd.setCursor(0, 0); lcd.print(newValue); } DcsBios::StringBuffer<8> cmscTxtJmrBuffer(0x1096, onCmscTxtJmrChange); void onCmscTxtChaffFlareChange(char* newValue) { lcd.setCursor(4, 0); lcd.print(newValue); } DcsBios::StringBuffer<8> cmscTxtChaffFlareBuffer(0x108e, onCmscTxtChaffFlareChange); void onCmscTxtMwsChange(char* newValue) { lcd.setCursor(0, 1); lcd.print(newValue); } DcsBios::StringBuffer<8> cmscTxtMwsBuffer(0x12b0, onCmscTxtMwsChange); void setup() { lcd.begin(16, 2); lcd.clear(); DcsBios::setup(); } void loop() { DcsBios::loop(); lcd.setBacklight(255); } hope this helps someone! Cheers Les
760mm Posted June 25, 2019 Posted June 25, 2019 Dear Pavespawn, please be so kind to get me a link to screen which you used. How can I find it? I need a screen like this: with a small rim to embed it in my panels. Отправлено с моего ZB602KL через Tapatalk
Hansolo Posted June 25, 2019 Posted June 25, 2019 Should be the same as mine; https://www.ebay.com/itm/IIC-I2C-2002-20x02-OLED-Module-Display-For-Arduino-PIC-AVR-ARM/131059330863?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2060353.m1438.l2649 Cheers Hans 132nd Virtual Wing homepage & 132nd Virtual Wing YouTube channel My DCS-BIOS sketches & Cockpit Album
760mm Posted June 25, 2019 Posted June 25, 2019 Wow! It is not chip. But thank you any way! Отправлено с моего ZB602KL через Tapatalk
lesthegrngo Posted June 26, 2019 Posted June 26, 2019 Should be the same as mine; https://www.ebay.com/itm/IIC-I2C-2002-20x02-OLED-Module-Display-For-Arduino-PIC-AVR-ARM/131059330863?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2060353.m1438.l2649 Cheers Hans Helped me too, I was getting cropping of the characters with the 1602 size modules. Yet again thanks Les
Heling Posted February 7, 2021 Posted February 7, 2021 I'm here with a similar problem. The Code looks clean, but inside the function is like a closed castle. Nothing will work inside. I tried four libraries with the same result. This happens in further codes Need help! /* CMSP-Display */ #define DCSBIOS_IRQ_SERIAL #include <Wire.h> #include "OLedI2C.h" #include <DcsBios.h> OLedI2C lcd; // The output to the 20 x 2 OLED works fine her in the setup area: void setup() { DcsBios::setup(); Wire.begin(); //lcd.setContrast(0x0A); // contrast as 0x00 to 0xFF lcd.init(); lcd.sendString("sby air ",0,0); lcd.sendString("c---f---",12,0); lcd.sendString("active",0,1); delay(999); } // Here the function without any output: //Jammer Display -------------------------- char onCmscTxtJmrChange(char* newValue) { lcd.clear(); lcd.sendString(newValue,0,0); } DcsBios::StringBuffer<8> cmscTxtJmrBuffer(0x1096, onCmscTxtJmrChange); void loop() { DcsBios::loop(); }
No1sonuk Posted February 7, 2021 Posted February 7, 2021 I think your problem is this line: char onCmscTxtJmrChange(char* newValue) { Try void onCmscTxtJmrChange(char* newValue) {
Tanarg Posted December 16, 2023 Posted December 16, 2023 The follow works fine with Hello World etc, but can't get it to work with DCS-BIOS. What am I missing, any help apricated? #define DCSBIOS_IRQ_SERIAL #include "DcsBios.h" #include <Wire.h> #include <hd44780.h> // main hd44780 header #include <hd44780ioClass/hd44780_I2Cexp.h> // i2c expander i/o class header // Include Adafruit SI1145 Library #include <Adafruit_SI1145.h> // declare lcd object: auto locate & auto config expander chip hd44780_I2Cexp lcd; // Define object uv Adafruit_SI1145 uv = Adafruit_SI1145(); // DCS-DIOS Radio frequency change for A-10II void onUhfFrequencyChange(char* newValue) { lcd.setCursor(0,0); lcd.print(newValue); } DcsBios::StringBuffer<7> uhfFrequencyBuffer(0x1180, onUhfFrequencyChange); void setup() { lcd.begin(16,2); lcd.clear(); DcsBios::setup(); } void loop() { DcsBios::loop(); }
Msiipola Posted December 18, 2023 Posted December 18, 2023 Have you checked the UhfFrequency variable (newValue) is changing with BORT?
Vinc_Vega Posted December 19, 2023 Posted December 19, 2023 (edited) As your UV sensor seems to be connected to the I2C bus too, you may include the LCD expander's address into the constructor. Something like this hd44780_I2Cexp lcd(0x27); Regards, Vinc Edited December 19, 2023 by Vinc_Vega Regards, Vinc real life: Royal Bavarian Airforce online: VJS-GermanKnights.de [sIGPIC][/sIGPIC]
Recommended Posts