I'm using a Nano and a LCD display 16,2 with dcsbios (dcs is digital combat simulator) to mirror some of the cockpit's lcds. I have no problem displaying capital letters and number's but when the program shows "error" i get "pww0w".
If i run a standard "hello world" program i can display all charaters without any trouble.
Do i need to set a language or something?
/*
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
#define ENABLE_PULLUPS
#include "DcsBios.h"
#include "LiquidCrystal.h"
//#include "LCD03.h"
const int rs =2,
en =3,
d4 =6,
d5 =7,
d6 =8,
d7 =9;
LiquidCrystal lcd (rs, en, d4, d5, d6, d7);
/* paste code snippets from the reference documentation here */
void onUfcScratchpadNumberDisplayChange(char* newValue) {
//lcd.clear();
lcd.setCursor(2, 0);
lcd.print (newValue);
}
DcsBios::StringBuffer<8> ufcScratchpadNumberDisplayBuffer(0x7446, onUfcScratchpadNumberDisplayChange);
void onUfcScratchpadString1DisplayChange(char* newValue) {
//lcd.clear();
lcd.setCursor(0, 0);
lcd.print (newValue);
}
DcsBios::StringBuffer<2> ufcScratchpadString1DisplayBuffer(0x744e, onUfcScratchpadString1DisplayChange);
void onUfcScratchpadString2DisplayChange(char* newValue) {
//lcd.clear();
lcd.setCursor(1, 0);
lcd.print (newValue);
}
DcsBios::StringBuffer<2> ufcScratchpadString2DisplayBuffer(0x7450, onUfcScratchpadString2DisplayChange);
//............
void setup() {
Serial.begin (9600);
lcd.begin(16,2);
lcd.clear();
DcsBios::setup();
}
void loop() {
DcsBios::loop();
}
ç is in UTF-8 a two byte character: 0xC3A7
so your LCD is printing the character from the character set in 0xC3 -> which is by default in the character ROM this "Japanese" letter.
You don't see the second A7 character as your line is full already.
i'll try it thanks.
Although my main problem isn't with special characters, it's just that the game shows "error" on screen and i get "pww0w" on the lcd. I'm not sure if your library will adress that