HEED is implemented in nesC for TinyOS, and evaluated on Mica2 and Mica2Dot sensor motes. Its code extends the Multihop routing module in TinyOS to cluster the network prior to building the routing tree.