Biosensors for environmental control