|
|
HiPi::Interface::SerLCD provides an implementation of HiPi::Interface::HD44780 for LCD devices using the Sparkfun SerLCD controller.
The module inherits many of its methods from HiPi::Interface::HD44780.
The module can accept one of the following literal values
when using the inherited 'update_baudrate' method.
2400, 4800, 9600, 14400, 19200, 38400
The following are the methods specific to this implementation.
See HiPi::Interface::HD44780 for inherited methods.
%params contains a number of key value pairs
Required key value pairs
width => $width
lines => $lines
You must specify the geometry of your LCD
e.g.
my $lcd = HiPi::Interface::SerLCD->new(
width => 16,
lines => 4,
);
Optional params and their defaults
backlightcontrol => 0
specify if methods setting the level of backlight can be used.
The method $lcd->backlight will only work if you set
backlightcontrol => 1 in the constructor.
devicename => '/dev/ttyAMA0'
baudrate => 9600
parity => 'none',
stopbits => 1,
databits => 8,
Example complete constructor call:
my $lcd = HiPi::Interface::SerLCD->new(
width => 16,
lines => 4,
backlightcontrol => 1
);
Toggles splash screen display on / off
Sets the current top 2 lines of text as the splash screen.
If the SerLCD gets into an unknown state, call
this to reset the LCD to default settings.