Skip to content

Commit db9dde5

Browse files
committed
Custom char working, NOTE previous commit was also fine
- I had tried plugging into an alternative power source to make the LCD refresh faster, someone was talking about having less than the ideal voltage would slow it down - that didn't fix the problem, but it apparently also broke driving the screen to some degree, moving the 5V and GCD back the the main driver board this code is working fine as well as the last commit - don't need these links anymore, but the first one has a little pixel doodle thing to design chars - some links from trying to work it out - https://maxpromer.github.io/LCD-Character-Creator/ - https://forum.arduino.cc/t/solved-custom-chars-not-being-printed-on-lcd/413082/9 - https://forums.adafruit.com/viewtopic.php?f=31&t=25972 - arduino-libraries/LiquidCrystal#6
1 parent 42521e3 commit db9dde5

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

HelloWorld_LCD/HelloWorld_LCD.ino

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -447,20 +447,22 @@ const int rs = 2,
447447
//LiquidCrystal lcd(rs, en, d0, d1, d2, d3, d4, d5, d6, d7);
448448
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
449449

450-
byte smiley[8] = {
451-
B00000,
450+
byte customChar[] = {
451+
B01110,
452+
B01010,
453+
B01110,
454+
B0000,
452455
B10001,
453-
B00000,
454-
B00000,
455456
B10001,
456457
B01110,
457-
B00000,
458+
B00000
458459
};
459460

460461
void setup() {
461-
lcd.createChar(0, smiley);
462462
lcd.begin(16, 2);
463-
lcd.write(byte(0));
463+
lcd.createChar(0, customChar);
464+
lcd.home();
465+
lcd.write((char)0);
464466
}
465467

466-
void loop() {}
468+
void loop() { }

0 commit comments

Comments
 (0)