Nanoshield_LCD¶
This is the Arduino library to access the LCD Nanoshield.
- Source code: https://github.com/circuitar/Nanoshield_LCD
- Documentation: http://nanoshield-lcd.readthedocs.org/
- Reference Board: LCD Nanoshield from Circuitar
Library features include:
- Same functions avalable in the vanilla LCD library available in the Arduino IDE (LiquidCrystal)
In addition:
- Turns backlight on
- Turns backlight off
To install, just click Download ZIP and install it using Sketch > Include Library... > Add .ZIP Library in the Arduino IDE.
The following examples are provided:
- LCDTest shows the common usage of the library.
Class Documentation¶
-
class
Nanoshield_LCD
¶ Inherits from Print
Public Functions
-
Nanoshield_LCD
(byte a0 = 1, byte a1 = 1, byte a2 = 1)¶ Constructor.
Creates an object to access one LCD Nanoshield
- See
- begin()
- Parameters
a0
: The 1st LSB of the LCD addressin the I2C bus.a1
: The 2nd LSB of the LCD addressin the I2C bus.a2
: The 3rd LSB of the LCD addressin the I2C bus.
-
void
begin
()¶ Initializes the module.
Initialize the Wire library, join the I2C bus as a master, configure GPIO pins, perform LCD reset by instruction in 4-bit mode, set as two lines, 5x8 characters and to, when writing, increment address and do not shift the display.
-
void
clear
()¶ Clears all the characters from display.
-
void
home
()¶ Sets the cursor to initial position.
-
void
setCursor
(uint8_t col, uint8_t row)¶ Sets the cursor position.
- Parameters
col
: The cursor column.row
: The cursor row.
-
size_t
write
(uint8_t data)¶ Writes a special character.
Writes a character pre-specified with createChar().
- Return
- Always returns 1.
- Parameters
data
: The code of the character to write.
-
void
cursor
()¶ Set the cursor as visible.
-
void
noCursor
()¶ Hides the cursor.
-
void
blink
()¶ Set the cursor as blinking.
-
void
noBlink
()¶ Sets the cursor as not blinking.
-
void
display
()¶ Turns the display on.
-
void
noDisplay
()¶ Turns the display off.
-
void
backlight
()¶ Turns backlight on.
-
void
noBacklight
()¶ Turns backlight off.
-
void
scrollDisplayLeft
()¶ Scrolls all the content on display to left.
-
void
scrollDisplayRight
()¶ Scrolls all the content on display to right.
-
void
autoscroll
()¶ Scrolls the display as needed while writing data.
-
void
noAutoscroll
()¶ Do not scroll the display as needed while writing data.
-
void
leftToRight
()¶ Moves the cursor to right when writes a character.
-
void
rightToLeft
()¶ Moves the cursor to left when writes a character.
-
void
createChar
(uint8_t num, uint8_t data[])¶ Creates a special character.
Creates a special character based on a byte vector of 8 elements. Each element represents a line of the character and must be composed of five bits, one for each column. If the bit is 1, so that pixel will be on, if the bit is zero, so that pixel will be off.
- Parameters
num
: A code to index the character from 0 to 7.data
: The vector representation of the character.
-
void
printPadded
(long l, int w, char pad = ' ', int base = DEC)¶ Print a long integer, left padding it with spaces or zeroes.
- Parameters
l
: The long integer to print.w
: Minimum width to print.pad
: Character to use for padding (default = ‘ ‘).base
: Number base to use when printing (default = DEC = 10).
-
This documentation was built using ArduinoDocs.