Friday, February 8, 2013

g13lcd.sh - a simple app to load text or images on a g13

This script gives you a simple one-liner way to display specific text or images on the g13 LCD screen.
This relies on:
    ecraven's g13 https://github.com/ecraven/g13
    netpbm http://netpbm.sourceforge.net/
    imagemagick http://www.imagemagick.org/


netpbm and imagemagick are both in Portage for Gentoo.

  • emerge -av netpbm imagemagick
  • download and `make` g13 : `git clone https://github.com/ecraven/g13`
  • copy pbm2lpbm to a bin directory like `/usr/local/bin` 

Next download and copy this `g13lcd.sh` script to a bin directory. You can also find it: http://pastebin.com/NA9xzpaH





You will need to start the g13 daemon before being able to output to the LCD. Either use the `g13` command or see previous entry about the `g13.sh` script I wrote.

Afterwards you can execute this script by either:
`g13lcd.sh --text2lcd TEXT GOES HERE` or
`g13lcd.sh --image2lcd /somedirectory/someimage.jpg`

It should be able to convert most image types to display on the screen. But it's (as of yet) a very basic script, it ignores all aspect ratio, doesn't do specific padding, etc. You'll want to make sure the image you're converting is about the  same size pretty much.

No comments:

Post a Comment