root/lm-sensors/trunk/prog/matorb/displayit.pl @ 491

Revision 491, 0.8 KB (checked in by phil, 14 years ago)

(Phil) Slightly better looking screen updates.

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1#!/usr/bin/perl
2
3# This is a simple perl script to display a 'screen'
4# on a Matrix Orbital Display.  In this case, this
5# script will read the first four lines (up to 20
6# chars a line) and display them on the display.
7
8# Written and copywritten (C) by Philip Edelbrock, 1999.
9
10
11# Turn off the blinking cursor
12$temp=`echo  "254 84" > /proc/sys/dev/sensors/matorb*/disp`;
13
14$linenum=1;
15
16while (<STDIN>) {
17 # Reset the position of the cursor to the next line
18 $temp=`echo "254 71 1 $linenum" > /proc/sys/dev/sensors/matorb*/disp`;
19 chop;
20 $_="$_                    ";
21 if (/^(.{1,20})/) {
22  $_=$1;
23  $line="";
24  while (/(.)/gc) {
25   $temp=ord($1);
26   $line="$line $temp";
27  }
28  $temp=`echo "$line" > /proc/sys/dev/sensors/matorb*/disp`;
29 }
30 $linenum+=1;
31 if ($linenum > 4) { exit; }
32}
Note: See TracBrowser for help on using the browser.