Examples

Here are some user space example to use our RGB panel led. All the examples are in Python and can be downloaded on your Arietta with a single git clone command:

~# git clone git://github.com/tanzilli/led-utils.git
Cloning into 'led-utils'...
remote: Counting objects: ..., done.
remote: Compressing objects: 100% (../..), done.
Receiving objects: 100% ..., done.
Resolving deltas: 100% ..., done.
~# cd led-utils
~/led-utils# ./clock-py

Install PIL

All the utilities use the Python Interface Library to manage images, font, etc so before trying any example install PIL on your Arietta G25 by typing:

# apt-get update
# apt-get install python-imaging

This is the list of utilities available. If you can't run something try to update your repository by typing: git pull.

Example: Convert and display any image from web

Let's see now how to convert an image to a byte array to be displayed on the led panel.

We will use, for example, this 256x256 pixel jpeg image but the same concept is valid for any images:

Download this image directly on Arietta G25 using wget and the image URL:

# wget http://www.acmesystems.it/www/ledpanel/right_arrow.jpg

Now launch convert.py with the local filename of the image:

~/led-utils# ./covert.py right_arrow.jpg
------------------------
[1] <- Brightness -> [2]
[3] <-  Contrast  -> [4]
[5] <-   Color    -> [6]
[7] <- Sharpness  -> [8]
[q] <-   Rotate   -> [w]
[i] Invert color        
[r] Reset               
[s] Save                
------------------------
Select (space exit):

With the keys [1] and [2] changes the brightness until the arrow color became equal t the original.

Pressing the [s] key it is possible to save a screenshot of the image with the name "panel_xxxx.rgb" where xxxx is an incremental counter.

The *.rgb file contains the raw byte array image at 3 bytes per color ready to be sent to /sys/class/ledpanel/rgb_buffer.

To display is return to the command line and type:

~/led-utils# cp panel_0000.rgb /sys/class/ledpanel/rgb_buffer

If you collect some screenshots it is possible to create a simple animation with a simple shell script like this:

#!/bin/bash
while [ 1 ]
do
    for f in *.rgb; 
    do
        cp $f /sys/class/ledpanel/rgb_buffer
        sleep 0.5
    done
done

Design a 32x32 icon from scratch

If you need to design a 32x32 icon from scratch you could use x-IconEditor.

X-IconEditor is an on-line graphic editor to create favicon.ico icons for the web pages but you can download and convert the favicon.ico file generated with convert.py and display it on your panel.

Source code: convert.py