Arduino Uno
Breadboard
LCD Screen
Wires
1 - VSS ⟶
2 - VDD ⟶
3 - V0 ⟶
4 - RS ⟶
5 - RW ⟶
6 - E ⟶
7 - D0
8 - D1
9 - D2
10 - D3
11 - D4 ⟶
12 - D5 ⟶
13 - D6 ⟶
14 - D7 ⟶
15 - A ⟶
16 - K ⟶
GND
5V
5
12
GND
13
8
9
10
11
3
GND
The LCD screen needs a lot of pins to be controlled. 3 pins need to be connected to the GND and 1 pin connected to the 5V. 4 pins are responsible for sending information to be displayed on the LCD (grey wires) and 2 pins to control when the information should be sent (green wires). 2 others pins (orange and purple wires) control the contrast of the LCD. Not all LCD pins need to be connected to the Arduino board.
To use the LCD screen it is required to include the library LiquidCrystal and create an object LiquidCrystal.
To simplify the process all pins used should be declared as contants at the beggining.
To print text in the LCD screen use the function print() and write between "" the text you want to write. But before write make sure the set the cursor in the right position. The function setCursor() moves the cursor to the line and column defined. Keep in mind, that the line and column start in the number 0. So the first line and column are 0.
To write number in the LCD, it is used the function print(), but an extra argument must be used. See the example below to write the number 15.
To use custom icons it is required to create the characters. Each icon can have 5x8 pixels (5 horizontal pixel and 8 vertical pixels). To each icon, it must be created a variable using 8 bytes, where 1 are the pixels which will be painted.
Example of a smiley icon.
After creating the variable, a new characeter must be created. They should be created inside the setup() function and associate a number to it. It is recommend to start in number 1.
To draw the icon the function write() must be called. Don't forget to set the cursor in the correct position, before wrting.
Open the example CustomCharacter and see how some icons were created and drew in the LCD screen.