The character shows up wherever I place my cursor and don't write anything to that space. If I were to write a string of letters, this special character would show up at the end of my letter string uninvited.
I have a completely unrelated issue now, inbetween power cycles, my code did not change, but the text on the screen has completely changed. Here is a copy of my code:
Code: Select all
#include "mbed.h"
char splash[] = //splash screen string
{
254, 88, //clear screen
254, 82, //auto scroll off
254, 71, 4, 2, //set cursor column 4, row 2
70, 111, 114, 109, 117, 108, 97, 32, 72, 121, 98, 114, 105, 100, //print "Formula Hybrid"
};
char data[] = //data screen initialization string
{
254, 88, //clear screen
254, 72, //set cursor home
83, 112, 101, 101, 100, 32, 32, 32, 32, 32, 32, 58, //print "Speed: "
254, 71, 1, 2, //set curser to column 1, row 2
73, 67, 69, 32, 84, 101, 109, 112, 32, 32, 32, 58, 32, 32, 32, 32, 32, 32,//print "ICE Temp: "
254, 71, 1, 3, //set curser to column 1, row 3
72, 86, 32, 66, 97, 116, 116, 101, 114, 121, 32, 32, 32, 32, 32, 58, //print "HV Bat: "
254, 71, 1, 4, //set curser to column 1, row 4
70, 117, 101, 108, 32, 76, 101, 118, 101, 108, 32, 58 //print "Fuel Level: "
};
int main()
{
Serial lcd(p9, p10); // tx, rx
lcd.baud(19200);
for(int i = 0; i <= sizeof(splash); ++i)
{
lcd.putc(splash[i]);
wait(0.05);
}
wait(5);
for(int j = 0; j <= sizeof(data); ++j)
{
lcd.putc(data[j]);
wait(0.001);
}
}