The purpose of each of these pins is described in
Table 9-1
.
Table 9-1
LCD shield pin assignments
The
setup
function is straightforward. You start serial communications so that the Serial
Monitor can send commands and initialize the LCD library with the dimensions of the
display being used. You also display the message “Arduino Rules” on two lines by setting
the cursor to top-left, printing “Arduino,” then moving the cursor to the start of the second
row and printing “Rules.”
Most of the action takes place in the
loop
function, which checks for any incoming
characters from the Serial Monitor. The sketch deals with characters one at a time.
Apart from ordinary characters that the sketch will simply display, there are also a
couple of special characters. If the character is a
Dostları ilə paylaş: