fixing RPi example to work with new API