We study a problem of K-barrier coverage by employing a network of self-deployed, autonomous mobile robotic sensors. A decentralized coordination algorithm is proposed for the robotic sensors to address the coverage problem. The algorithm is developed based on some simple rules that only rely on local information. By applying the algorithm to the robotic sensors, K layers of sensor barriers are formed to cover the region between two given points. To illustrate the proposed algorithm, numerical simulations are carried out for a number of scenarios.