We advocate a novel programming approach we call slotted programming that not only addresses the specific hardware capabilities of sensor nodes, but also facilitates coding through a truly modular design. The approach is based on the temporal decoupling of the different tasks of a sensor node such that at any time at most one task is active. In contrast to traditional sensor network programming, slotted programming guarantees that each of these tasks can be implemented as an independent software module, simplifying not only the coding and testing phase, but also the code reuse in a different context. In addition, we believe that the proposed approach is highly qualified for energy efficient and real time applications. To substantiate our claims, we have implemented slotos, an extension to TinyOS that supports slotted programming. Within this framework, we demonstrate the advantages of the slotted programming paradigm. Categories and Subject Descriptors