Arduino Multi-line LCD character

If you haven’t tried a single cell LCD character please click here to start with that tutorial.

Your goal is to create an original, graphic that spreads across at least  four LCD display cells like this:

Note how this simple graphic is spread across four cells.  To create this graphic I used the LCD Custom Character Generator. 

LCD coordinates

Building the custom graphic
I also used graph paper. You don’t have to use it but plotting my design out on good old paper worked well.  You can download a printable sheet of graph paper right here.

It’s not an exact match. Don’t judge. 🙂

I divided the graph paper into cells.  Each cell has 8 rows and 5 columns.

 

LCD special character Arduino

What worked for me was to draw a rough outline of the fish and then fill in the squares to get close to the desired shape.  Then I worked one section at a time to build the shape.

Next, I went to https://maxpromer.github.io/LCD-Character-Creator/
and built each cell by following my graph paper plan.  It was helpful to build the first cell on one tab in the browser and then add create the next cell on a new tab. This way I can refer back and forth to check alignment.

Like this:

Writing the program
To build the program, copy and paste the code from each cell into your program.  The program to build the fish is below.

//graphics built using https://maxpromer.github.io/LCD-Character-Creator/

#include<LiquidCrystal.h> //you have to use this line to use the LCD library

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);//indicates what pins control LCD display

byte Fish1[] = {
B10000,
B11000,
B01011,
B00111,
B00111,
B01011,
B11000,
B10000
};

byte Fish2[] = {
B00011,
B00111,
B11111,
B11111,
B11111,
B11111,
B00111,
B00011
};

byte Fish3[] = {
B11100,
B11111,
B11111,
B11111,
B11111,
B11111,
B11111,
B11100
};

byte Fish4[] = {
B00000,
B11000,
B11100,
B11010,
B11111,
B11110,
B11100,
B00000
};

void setup()
{
lcd.begin(0, 0);
lcd.createChar(0, Fish1); //assigns a number to each cell
lcd.createChar(1, Fish2);
lcd.createChar(2, Fish3);
lcd.createChar(3, Fish4);

}

void loop()
{
lcd.setCursor(0, 0); //sets start location on display. First number is the column and second is row
lcd.write(byte(0)); //displays the character by number – 0 is first
lcd.write(byte(1)); //these are bring displayed from left to right on the LCD
lcd.write(byte(2));
lcd.write(byte(3));
}