Device::MatrixOrbital::GLK - Control the GLK series Matrix Orbital displays
use Device::MatrixOrbital::GLK; my $lcd = new Device::MatrixOrbital::GLK(); $lcd->clear_screen(); $lcd->print("Hello World!"); $lcd->close();
Device::MatrixOrbital::GLK is an object oriented perl module for controlling the GLK serial of LCD screens made by Matrix Orbital.
For more information about GLK series MatrixOrbital displays, please visit: http://www.matrixorbital.ca/products/glk_Series/
Please note that I am not an employee and have nothing to do with MatrixOrbital, other than being a happy customer.
Creates a new
Device::MatrixOrbital::GLK object. All of the parametes are optional. The default port is '/dev/ttyS0', the default baud rate is 19200 and by default the LCD screen type will be detected automatically.
Display a string on the screen.
Display a formatted string on the screen.
This command turns the backlight on after the [minutes] timer has ex- pired, with a one-hundred minute maximum timer. A time of 0 specifies that the display should turn on immediately and stay on. When this com- mand is sent while the remember function is on, the timer will reset and begin after power up.
This command turns the backlight off immediately. The backlight will remain off until a
backlight_on() command has been received.
This command moves the text insertion point to the top left of the display area, based on the current font metrics.
This command sets the display's contrast to
$contrast is a value between 0 to 255. Lower values cause 'on' elements in the display area to appear lighter, while higher values cause 'on' elements to appear darker.
set_contrast() method, only this command saves the
$contrast value so that it is not lost after power down.
This command sets the backlight brightness according to
set_brightness() method, only this command saves the
$brightness value so that it is not lost after power down.
When auto scrolling is on, it causes the display to shift the entire display's contents up to make room for a new line of text when the text reaches the end of the scroll row defined in the font metrics (the bottom right character position).
When auto scrolling is disabled, text will wrap to the top left corner of the display area when the text reaches the end of the scroll row defined in the font metrics (the bottom right character position). Existing text in the display area is not erased before new text is placed. A series of spaces followed by a
cursor_home() command may be used to erase the top line of text.
This command sets the drawing color for subsequent graphic commands that do not have the drawing color passed as a parameter. The parameter
$color is the value of the color where white is 0 and black is 1-255.
This command clears the display and resets the text insertion position to the top left position of the screen defined in the font metrics.
This command will draw a bitmap that is located in the on board memory. The bitmap is referenced by the bitmaps reference identification number, which is established when the bitmap is uploaded to the display module. The bitmap will be drawn beginning at the top left, from the specified X,Y coordinates.
This command will draw a pixel at
$y using the current drawing color.
This command will draw a line from
$y2 using the current drawing color. Lines may be drawn from any part of the display to any other part. However, it may be important to note that the line may in- terpolate differently right to left, or left to right. This means that a line drawn in white from right to left may not fully erase the same line drawn in black from left to right.
This command will draw a line with the current drawing color from the last line end (x2,y2) to
$y. This command uses the global drawing color.
This command draws a rectangular box in the specified color. The top left corner is specified by
$y1 and the bottom right corner by
This command draws a solid rectangle in the specified color. The top left corner is specified by
$y1 and the bottom right corner by
$y2. Since this command involves considerable processing overhead, we strongly recommend the use of flow control, particularly if the command is to be repeated frequently.
Returns the model of the LCD module that you are communicating with (for example 'GLK24064-25').
Returns the dimensions (in pixels) of the LCD screen you are talking to as an array, width followed by height.
Returns the firmware version of the LCD module that you are communicating with as a dotted integer (for example '5.4').
Manuals for the GLK and GLC Series of graphic LCD's:
Nicholas J Humfrey, email@example.com
Copyright (C) 2007 Nicholas J Humfrey
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.005 or, at your option, any later version of Perl 5 you may have available.