User manual
6.20 | .createChar()
.createChar()
creates a dedicated character. For this, we need to
create an array with eight data fields, by defining our
character.
lcd.createChar
gives our character a serial number with
the first parameter. The Second parameter hands over the name
of the array. Up to eight own characters, which are called with
0 to 7 can be created.
Arduino™-Syntax
001 byte myChar[8] = {
002 B00000,
003 B10001,
004 B00000,
005 B00000,
006 B10001,
007 B01110,
008 B00000,
009 }
010
011 void setup()
012 {
013 lcd.createChar(0, myChar)
014 lcd.begin(16, 2)
015 lcd.write(byte(0));
016 }
LCD FUNCTIONS
The following example summarises the LCD functions explained
above in a larger example. Look at the program code and change
a few of the parameters just described to fully understand the
function.
The experiment requires the LCD basic writing that you set up
in the function test.
001 // Integrating LCD-Library
002 #include <LiquidCrystal.h>
003
004 // Specifying LCD pins
005 // RS, E, D4, D5, D6, D7
006 LiquidCrystal lcd(11, 10, 2, 3, 4, 5);