Showing posts with label tellymate. Show all posts
Showing posts with label tellymate. Show all posts

Wednesday, 27 April 2011

boxes on tellymate

Thomas Jensen's boxes
"... draws any
kind of boxes
around your text!"

add these lines to the config file to use the Code page 437 line characters on the Tellymate

#===========================================
BOX tellymateLine
sample
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ tellymateLine ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ

ends
shapes {
nw ("Ú") n ("Ä") ne ("¿")
w ("³") e ("³")
sw ("À") s ("Ä") se ("Ù")
}
elastic (n,s,e,w)
END tellymateLine

BOX tellymateDLine
sample
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º tellymareDline º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ

ends
shapes {
nw ("É") n ("Í") ne ("»")
w ("º") e ("º")
sw ("È") s ("Í") se ("¼")
}
elastic (n,s,e,w)
END tellymateDLine

Wednesday, 6 April 2011

Tellymate works good

I bought a TTL Tellymate kit from Batsocks to hook to my Bifferboard, with a simple transistor to invert the RS232 it works good. It's like cool retro ascii from days gone by.
I whipped up a quick bash script to interact with it :
#=============================
#!/bin/bash
export TERM=vt52
PORT=/dev/ttyS0
ESC="\x1b"

function dohelp {
echo -en "tm \n -c clear screen\n -q print diagnostic info\n -b big letter banner \n -e program to run\n"
}

function cls {
echo -en $ESC"E" >$PORT
}
while getopts "b:cqe:h" flag
do
case "$flag" in
c) CLS="yes" ;;
q) Q="yes" ;;
b) BIGTEXT="$OPTARG" ;;
e) PROG=$OPTARG ;;
h) dohelp;;
esac
done
if [ "$PROG" != "" ] ;then savestate ;fi
if [ $CLS ]; then cls;fi
if [ $Q ];then
echo -en $ESC"Q" >$PORT
fi

if [ "$BIGTEXT" != "" ]; then
echo -en $ESC"_4"$BIGTEXT"\n"$ESC"_5"$BIGTEXT"\n" >$PORT
fi
#needs more functions to do x and y pos etc..
#====================================================

along with figlet and the fold and other linux text utilities it was easy to do stuff :
eg.
tm -c -b TESTING -e "figlet -c -w38 Telly Mate test"

tm -c -e "figlet -c -w38 `date`"
(hard to take good photos of lcd but )