The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Roku::LCD - M400 & M500 Display Functions made more accessible than via the Roku::RCP module

VERSION

Version 0.05 May 27, 2014 - continuing to modernize the code

SYNOPSIS

 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;

DESCRIPTION

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.

METHODS

new(host => host_address [, port => port] [, model => 400 or 500])

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).

marquee(text => text to display [, clear => 0/1])

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)

ticker(text => text to display [, y => 0/1] [, pause => seconds])

An alternative to the marquee that can be displayed on either the top or bottom line.

teletype(text => text to display [, pause => seconds] [, [linepause => seconds])

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.

onstandby

Checks whether the Soundbridge is on standby (returns true) or in use (returns false)

sb_response

Used to return any command responses; filtering out prompts

STANDARD VARIABLES

clear

  • 0 (default) do not clear display first

  • 1 clear display first

BUGS AND LIMITATIONS

To do list

  • teletype method requires refactoring.

AUTHOR

Outhwaite, Ed, <edster at gmx.com>

ACKNOWLEDGEMENTS

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

LICENSE AND COPYRIGHT

Copyright 2014 Outhwaite, Ed.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

DISCLAIMER OF WARRANTIES

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.