simple example, tested on Ubuntu 12.10 and Raspbian wheezy