working detection example for rpi