The advent of the Internet of Things has enabled the roll-out of a multitude of Wireless Sensor Networks. These networks can be used in various fields, such as agriculture, industry or the smart city, where they facilitate fine optimization of processes. These devices are often powered by primary or rechargeable batteries, which limits their battery life. Moreover, it is sometimes not possible or financially viable to change and/or recharge these batteries.A possible solution is to harvest energy from the environment to power these sensors. But these energy sources are unreliable, and the sensor must be able to prevent the complete depletion of its energy storage. In order to adapt its energy consumption, the node can match its quality of s...