Sensor networks in theory and practice