Roku::LCD - M400 & M500 Display Functions made more accessible than via the Roku::RCP module
use Roku::LCD; my $display = Roku::LCD->new($rokuIP); if (! display) { die("Could not connect to Roku Soundbridge"); } my($rv) = $display->marquee(text => "This allows easy access to the marquee function - timings for M400 only"); $display->ticker(text => "An alternative to the marquee function that can cope with large quantities of text", pause => 5); open (INFILE, "a_text_file.txt"); @slurp_file = <INFILE>; close(INFILE); $display->teletype(text => "@slurp_file", pause => 2, linepause => 1); $display->Quit;
Roku::LCD was written because the RokuUI module appeared a bit too high level, so I put together some simplified display routines into a single easy-to-use object.
It has now been moved to using the Roku::RCP module which is easily available from CPAN.
It inherits all the methods from the standard Roku::RCP module.
If not given, the port number is assumed to be 4444, and the model will be determined from the displaytype command (if that fails, the model type will be set to M400).
This allows quick access to the standard sketch marquee function - timings are for text sized to the M400 display as I do not have access to an M500.
If 1 is passed to clear, it forces the display to clear first (default 0)
An alternative to the marquee that can be displayed on either the top or bottom line.
An alternative to using marquee to display large quantities of text, scrolling the display upwards rather than from the right.
The length of time to pause after each line of text is given by linepause, wheras pause holds the length of time to pause at the end of the text.
Checks whether the Soundbridge is on standby (returns true) or in use (returns false)
Used to return any command responses; filtering out prompts
0 (default) do not clear display first
1 clear display first
teletype method requires refactoring.
Outhwaite, Ed, <edster at gmx.com>
<edster at gmx.com>
Both ticker and teletype were inspired by Rod Lord's work on the Hitch-Hiker's Guide to the Galaxy TV program. http://www.rodlord.com/pages/hhgg.htm
Copyright 2014 Outhwaite, Ed.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
To install Roku::LCD, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Roku::LCD
CPAN shell
perl -MCPAN -e shell install Roku::LCD
For more information on module installation, please visit the detailed CPAN module installation guide.