This paper addresses the problems of barrier coverage and sweep coverage in a corridor environment with a network of self-deployed mobile autonomous robotic sensors. Using the ideas of nearest neighbor rules and information consensus, we propose a decentralized control law for the robotic sensors to solve the coverage problems. Numerical simulations illustrate the effectiveness of the proposed algorithm. The results in this paper demonstrate that such simple motion coordination rules can play a significant role in addressing the issue of coverage in a mobile robotic sensor network.