Hi everyone,
I am trying to understand how to get dcs bios to work with my 1602 lcd. I am also using I2C. I am able to use the lcd to write whatever I want but not get a string buffer to work. Through the control reference I thought I just assign the string to the display i.e (0,0) or (0,1) for 16x2 display. Any information would help a lot so I can see how I'm coding it wrong. Thank you in advance. My code is here:
/*
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"
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
///LINE 1
void onCmsp1Change(char* newValue) {
lcd.setCursor(0,0);
}
DcsBios::StringBuffer<16> cmsp1Buffer(0x1000, onCmsp1Change);
////LINE 2
void onCmsp2Change(char* newValue) {
lcd.setCursor(0,1);
}
DcsBios::StringBuffer<16> cmsp2Buffer(0x1014, onCmsp2Change);
void setup() {
DcsBios::setup();
// initialize the LCD
lcd.begin();
// Turn on the blacklight and print a message.
}
void loop() {
DcsBios::loop();
}