The use of wireless sensor networks has touched several domains: scientific, logistic, agriculture, military, health... Sensor equipments are limited in resources: CPU, Memory, transmission, energy. Several routing protocols have been proposed mainly for this type of network. It is in this context that we have studied and implemented the LEACH routing protocol which is a clustering based protocol and considered efficient in terms of energy consumption. The test platform is the TinyOS system. The programming language used is NesC. The protocol is tested on the TOSSIM simulator and on TelosB sensors.