add ifs to exclude raspberrypi-specific code