Saturday, July 11, 2009

Zipit2 clock, email / twitter monitor

This was my second (and last) project involving the Zipit2.
It culminated in a PHP script that generates images based on dynamic information, called ImgUI. This can then be displayed on any device that is capable of pulling and displaying images from an HTTP server. The idea should be reusable for any device that fits the criteria.
For the ZipIt2, the quick and dirty way to display images on the screen was to switch the tty over to graphical mode, then just dump raw data to /dev/fb0. This has to be the right orientation and format. I've coded up a tool that takes raw RGB888 pixeldata flips it the right way, then converts it to BGR565. This is used by the script. A minimal shell script on the z2 then just pulls a new image every minute or so and dumps it to the framebuffer. Above you see the Z2 displaying the clock "applet". Thanks to PHP's imap extension I also have one that checks specific folders on imap accounts, and displays unread mail.

Plus I also included a sample twitter applet:

I'm releasing this under the MIT license.

Includes applets seen above, z2 output driver and script, plus a readme file that should tell you everything you need to know.

Download here: ImgUI Z2


  1. I have been playing with this recently but it seems that a couple of files might be missing from the archive or i'm miss understanding something. the *live.php doesn't seem to be in the archive which i presume is the script the zipit needs to hit

  2. ah n/m it looks like i was misunderstanding something as it's working if i use png_dumb but not if it goes through the z2 driver, looks like paths problem and also the fact that rgb2fb segfaults when compiled on the server.

  3. Well I've never tested it on anything other than my home windows server. If you modified the paths in drivers\z2.php and it still doesn't work, try running a conversion by hand. "convert something.png something.rgb", then "rgb2fb something.rgb". If you're running linux, you should make sure your apache/etc.. user has access to ImageMagick's convert. Also, it DOES crash if you run it without a file name. I really didn't put any error handling into it whatsoever, as you can see from the source code. Nothing else comes to mind. Good luck :)


Moderation temporarily re-enabled due to increased spam