example code for raspberry pi