During the past few years, research in the field of cooperative control of swarms of robots and especially UAV has continuously increased. In order to develop research in the field of swarms of UAV, this paper identifies three problems: the development of a testbed for UAV, the implementation of an ad hoc network and a protocol based on network control, and a consensus control algorithm for cooperative control of UAV. The testbed currently enables us to perform waypoint navigation using a Global Positioning System (GPS). The protocol communication designed for the ad hoc network has proved to be reliable for our application and can be expanded to be used with different numbers of agents. The algorithm of consensus control has been analyzed and tested in simulation. Future work will allow implementing the consensus control as a centralized or distributed control.