Code for the sensor box