LK204-7T-1U custom character
Posted: Tue Oct 21, 2014 1:40 pm
I can't seem to create and display a custom character on my LK204-7T-1U display. (weird signs appear)
here's my code for the degree " °c " example from the manual page 21.
Am I doing something wrong?
here's my code for the degree " °c " example from the manual page 21.
Code: Select all
//LK204-7T-1U
byte degree[8] = { 00001000, 00010100, 00001000, 00000011, 00000100, 00000100, 00000011, 00000000 };
void setup()
{
ClearLCD();
Serial1.begin(19200);//serial1 port for communication with my arduino
}
void loop() {
ClearLCD();
CursorPos(1,1);
createchar();
delay(20000);
}
void createchar(){
Serial1.write(254);
Serial1.write(78);
Serial1.write(1); //Character ID, value between 0 and 7
Serial1.write( degree[8]); //character pixel data
}
void ClearLCD(){
Serial1.write(254);
Serial1.write(88);
}
void CursorPos(int xpos, int ypos){
Serial1.write(254);
Serial1.write(71);
Serial1.write(xpos);
Serial1.write(ypos);
}