Wireless Sensor Networks (WSNs) consist of large number of randomly deployed energy constrained sensor nodes. Sensor nodes have ability to sense and send sensed data to Base Station (BS). Sensing as well as transmitting data towards BS require high energy. In WSNs, saving energy and extending network lifetime are great challenges. Clustering is a key technique used to optimize energy consumption in WSNs. In this paper, we propose a novel clustering based routing technique: Enhanced Developed Distributed Energy Efficient Clustering scheme (EDDEEC) for heterogeneous WSNs. Our technique is based on changing dynamically and with more efficiency the Cluster Head (CH) election probability. Simulation results show that our proposed protocol achieves longer lifetime, stability period and more effective messages to BS than Distributed Energy Efficient Clustering (DEEC), Developed DEEC (DDEEC) and Enhanced DEEC (EDEEC) in heterogeneous environments.