[Libphidget-cvs-commits] CVS: libphidget/src/examples send.sh,NONE,1.1
Status: Alpha
Brought to you by:
jstrohm
From: Jack S. <js...@us...> - 2002-12-18 00:09:53
|
Update of /cvsroot/libphidget/libphidget/src/examples In directory sc8-pr-cvs1:/tmp/cvs-serv7835/examples Added Files: send.sh Log Message: Simple script that can take standard input and make it scroll down a Text LCD phidget --- NEW FILE: send.sh --- #!/bin/sh # Simple little script that uses pidget_cpp to send data out a TextLCD # use command line -u argument or change puid in here to the serial number # of your TextLCD # # Usage: # cat {somefile} | send.sh -u {phidget serial} # # so you could do this: # cat send.sh | send.sh -u 869 # # and the TextLCD would scroll the contents of that file # # or: # cat - | send.sh -u 869 # # Type stuff, and every time you press enter it will send to the phidget # # Enjoy! puid=869 if [ "$1" == "-u" ] then puid=$2 fi pcpp="./phidget_cpp -u $puid " $pcpp -t 0 0 " " $pcpp -t 1 0 " " $pcpp -t 2 0 " " $pcpp -t 3 0 " " $pcpp -ton cat - | while read a do aa=`printf "%-12s" "$a"` $pcpp -t 0 0 "$d" $pcpp -t 1 0 "$c" $pcpp -t 2 0 "$b" $pcpp -t 3 0 "$aa" d="$c" c="$b" b="$aa" done sleep 1 $pcpp -toff |