Code for the Environmental and Energy Sensors