Adafruit Industries, Essential service and business: NYC – Executive Order 202.6 - Read more. Accepting essential orders - here's how.
0

createChar with LCD Backpack
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

createChar with LCD Backpack

by 762spr on Sun Dec 15, 2019 4:29 am

What is the proper usage of createChar with the I2C/SPI character LCD backpack?

I am getting strange results if I try:

Code: Select all | TOGGLE FULL SIZE
uint8_t full[8] = {0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f};
void setup() {

lcd.begin(16, 2);
lcd.print("text");
lcd.createChar(0,full);
lcd.print((char)0);
lcd.print("text2");
lcd.setBacklight(HIGH);

}


The screen will only show "text". However if I thin comment out lcd.createChar(0,full); and re upload, the screen will show "text" the full character, and "text2".

It's like the character is being written to the memory but then the program hangs. With a soft reset, it seems to retain the custom character in memory and can then read it. If I unplug the board and wait, then plug it back in, the custom character reverts to default.

Is this a bug or am I doing something wrong?
Thanks.

762spr
 
Posts: 20
Joined: Thu Dec 20, 2018 4:23 am

Re: createChar with LCD Backpack

by adafruit_support_carter on Mon Dec 16, 2019 8:02 pm

Try using the regular serial monitor as a quick test. So add something like a
Code: Select all | TOGGLE FULL SIZE
Serial.println("test");

after your call to createChar and see if it still seems to be hanging.

adafruit_support_carter
 
Posts: 14974
Joined: Tue Nov 29, 2016 2:45 pm

Please be positive and constructive with your questions and comments.