Abstract. Wireless sensor networks are often densely deployed for environmental monitoring applications. Collecting raw data from these networks can lead to excessive energy consumption. Thus using the spatial and temporal correlations that exist between adjacent nodes we appoint a few as representative nodes that perform in-network aggregation. This reduces the total number of transmissions. Our distributed scheduling algorithm autonomously assigns a particular node to perform aggregation and reassigns schedules when network topology changes. These topology changes are detected using cross-layer information from the underlying MAC layer. We also present theoretical performance estimates and upper bounds of our algorithm and evaluate it by implementing the algorithm on actual sensor nodes, demonstrating an energy-saving of up to 80% compared to raw data collection.