Problem with DCS BIOS simple display 16x2 with I2C - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 11-03-2019, 11:39 AM   #1
raptor909
Junior Member
 
raptor909's Avatar
 
Join Date: Jul 2018
Location: Italy
Posts: 6
Default Problem with DCS BIOS simple display 16x2 with I2C

I try to make this https://www.youtube.com/watch?v=h5kmggq4ykE with Arduino compatible board (Elegoo) and I2C board but nothing appear on display (16x2). The sketch "Hello World" is ok. Where's the issue?. Trying to use DCSBIOS_IRQ_SERIAL give me this error:

HardwareSerial0.cpp.o (symbol from plugin): In function `Serial':

(.text+0x0): multiple definition of `__vector_18'

C:\Users\...\AppData\Local\Temp\buildf609cf24e499ea4eca143c471bfeee27.tmp\sketch\i2c_dcsbios.ino.ino.ino.cpp.o (symbol from plugin).text+0x0): first defined here

collect2.exe: error: ld returned 1 exit status


I tried different speed baud rate (115k, 250k) but the issue remain

I use an Arduino One not original but an Elegoo compatible and a I2C board. I tried with switch 2 or 3 pos and is ok, tried with servo and potentiometers and is ok. I try to upload a simple sketch like "Hello World" and appear correctly on display.

Help me plz. Thanks.


This is my code

#define DCSBIOS_DEFAULT_SERIAL

#include <Wire.h>

#include <Servo.h>

#include <LiquidCrystal_I2C.h>

#include <DcsBios.h>

#define LED_PIN 3



LiquidCrystal_I2C lcd(0x27, 16, 2);

void onUhfFrequencyChange(char* newValue) {
lcd.setCursor(0, 0);
lcd.print(newValue);
}
DcsBios::StringBuffer<7> uhfFrequencyBuffer(0x1180, onUhfFrequencyChange);

void onClockHhChange(char* newValue) {
lcd.setCursor(0, 1);
lcd.print(newValue);
}
DcsBios::StringBuffer<2> clockHhBuffer(0x10fe, onClockHhChange);

void onClockMmChange(char* newValue) {
lcd.setCursor(3, 1);
lcd.print(newValue);
}
DcsBios::StringBuffer<2> clockMmBuffer(0x1100, onClockMmChange);

void onClockSsChange(char* newValue) {
lcd.setCursor(6, 1);
lcd.print(newValue);
}
DcsBios::StringBuffer<2> clockSsBuffer(0x1102, onClockSsChange);

void onClockEtcChange(char* newValue) {
lcd.setCursor(9, 1);
lcd.print(newValue);
}
DcsBios::StringBuffer<3> clockEtcBuffer(0x1104, onClockEtcChange);

DcsBios:rotocolParser parser;

void setup() {
Serial.begin(500000);
lcd.backlight();
pinMode(LED_PIN, OUTPUT);
analogWrite(LED_PIN, 50);
lcd.init();
lcd.clear();
// put your setup code here, to run once:

}

void loop() {
// put your main code here, to run repeatedly:

}

___________________________________________________________________
SOLVED !!! just delete line Serial.begin(500000);
___________________________________________________________________

Last edited by raptor909; 11-03-2019 at 01:44 PM.
raptor909 is offline   Reply With Quote
Old 11-03-2019, 04:05 PM   #2
[FSF]Ian
ED Testers Team
 
Join Date: Feb 2013
Location: Germany
Posts: 1,290
Default

The video you are referencing was made with the very first DCS-BIOS version in mind, so the code it shows is based on an outdated example sketch.


As you already found out, you need to remove the "Serial.begin(500000);" line. You also need to add "DcsBios::setup()" to your setup() function and "DcsBios::loop()" to your loop() function. Refer to the IRQSerial sketch from the current Arduino library to see how it should look.
[FSF]Ian is offline   Reply With Quote
Old 11-03-2019, 06:34 PM   #3
raptor909
Junior Member
 
raptor909's Avatar
 
Join Date: Jul 2018
Location: Italy
Posts: 6
Default

Yes. I also added "DcsBios::setup()" to your setup() function and "DcsBios::loop()" to your loop() function and work great.

Thanks.
raptor909 is offline   Reply With Quote
Old 12-02-2019, 04:52 PM   #4
raptor909
Junior Member
 
raptor909's Avatar
 
Join Date: Jul 2018
Location: Italy
Posts: 6
Default

Quote:
Originally Posted by [FSF]Ian View Post
The video you are referencing was made with the very first DCS-BIOS version in mind, so the code it shows is based on an outdated example sketch.


As you already found out, you need to remove the "Serial.begin(500000);" line. You also need to add "DcsBios::setup()" to your setup() function and "DcsBios::loop()" to your loop() function. Refer to the IRQSerial sketch from the current Arduino library to see how it should look.
HI
I need an help plz.
I want to display the Fuel Flow Gauges or from other gauge of the A-10 on a 16x2 LCD Display like this old thread
https://forums.eagle.ru/showthread.php?t=145515 but give me an error after compiling. Probably that's an old code.
I'm able to display all display of A10 like clock, vhf radio, uhf radio, CDU Panel but nothing from gauges.
Can you help me ? Maybe a sketch ?
Thank you so much
raptor909 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 12:45 PM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.