Opportunistic computing for wireless sensor networks