Designing Robust Wireless Sensor Applications