OscarVictor11 Posted December 16, 2021 Posted December 16, 2021 Members 13 Author I am in the process of building an F18 UFC panel with the scratchpad and selection displays but cannot seem to write the Arduino/Dcs Bios sketch to present the Scratch Pad info. I have no previous computer or electronics skills so the process has been a fair old challenge. I'm using a Leo Bodnar for the switches and an Arduino Mega together with a Grove Base Shield V2 for the i2c LCD (Grove-Lcd RGB Backlight) i2c display. Having selected the suggested 'IRQ serial connection' and copied the relevant libraries for the sketch as shown below, I can compile as far as this. I know there are some line's of code missing but whatever I try fails to compile. The main source of instruction has been two youtube demos, both of which, with the best of intent, are confusing and fail to logically demonstrate fully. Having used the Arduino/ Grove base shield and the 16 x 2 Grove display I can easily install the ' Hello World ' sketch, change this to other info such as Com 1 140.000 in various colors so the kit works fine. Its the implementation of the scratchpad info that's proving to be difficult and any help would be much appreciated. #include <Wire.h> #include <rgb_lcd.h> /* 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 "DcsBios.h" rgb_lcd lcd; } void onUfcScratchpadNumberDisplayChange(char* newValue) { /* your code here */ } DcsBios::StringBuffer<8> ufcScratchpadNumberDisplayBuffer(0x7446, onUfcScratchpadNumberDisplayChange); /* paste code snippets from the reference documentation here */ void setup() { DcsBios::setup(); lcd.begin(16, 2); } void loop() { DcsBios::loop();
Recommended Posts