This repository has been archived on 2024-01-26. You can view files and clone it, but cannot push or open issues or pull requests.
led-textfeed/textfeed.sh

23 lines
474 B
Bash
Raw Normal View History

2015-02-23 22:27:22 +01:00
#!/bin/sh
2015-02-23 22:48:08 +01:00
HOST="172.22.239.182"
PORT=8888
NC=$(which nc)
DEBUG=0
MESSAGE="Z"
MESSAGE="$MESSAGE "
if [ "$DEBUG" = 0 ]; then
echo -n "$MESSAGE" \
| convert -extract 16x16+43+43 -background lightblue -fill blue -pointsize 21 text:- bmp3:- \
| dd bs=1 skip=54 \
| "$NC" -u "$HOST" "$PORT"
else
echo -n "$MESSAGE" \
| convert -extract 16x16+43+43 -background lightblue -fill blue -pointsize 21 text:- bmp3:- \
> /tmp/debug.bmp
gpicview /tmp/debug.bmp
fi