using pi4j and example code from lediouris.net