#!/usr/bin/perl -w # # # Original Version # ---------------- # http://www.Linux-1U.net/LCD/scripts/test_lcd.onetime.pl # # # xx-yyy-01 bxh Flush the LCD of junk # 22-May-02 amo Added Comments # # # Usage: test_lcd.onetime.pl "MessageOneisHere" "Message-two" # # use FileHandle; se_text(@ARGV); # exit; # # # Write stuff once to the LCD # sub se_text { # my $SERIALPORT = "/dev/ttyS1"; # # set the baud rate # system "stty 9600 <$SERIALPORT"; open LCDOUT, "> $SERIALPORT"; # # clear the lcd screen # LCDOUT->autoflush(1); my $lcdcmd = "\xFE"; my $cls = $lcdcmd."\x01"; my $cursorhome = $lcdcmd."\x02".$lcdcmd."\xEF"; my $line2 = $lcdcmd."\xC0"; print LCDOUT "$cls\n"; print LCDOUT "$cursorhome"; print LCDOUT "$_[0]"; # first line text print LCDOUT "$line2"; print LCDOUT "$_[1]"; # second line text close LCDOUT; # } # se_text # # # end of file