Code for Envwi Sense master (Raspberry Pi)