The aim of this paper is to present S-DSL, an external domain-specific language for programming sensor nodes, which seeks to facilitate the programming of devices using easily understood language that allows the developer to focus on the states which can pass a node and the actions to be developed in each state.