File: scrolling_text.pl

package info (click to toggle)
libhipi-perl 0.93-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 20,048 kB
  • sloc: perl: 471,917; ansic: 22; makefile: 10
file content (28 lines) | stat: -rwxr-xr-x 462 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/perl
use strict;
use warnings;

use HiPi::Interface::MicroDotPHAT;

my $phat = HiPi::Interface::MicroDotPHAT->new();

print q(Scrolling Text
Scrolls a message across the screen.
Usage: scrolling_text.pl "your message"
Press Ctrl+C to exit.
);

my $text = $ARGV[0] || "Fifteen men on the dead man's chest       ";

$phat->write_string( $text );

$phat->show;

while (1) {
    $phat->scroll;
    $phat->show;
    $phat->sleep_milliseconds( 50 );
}


1;