Code for the sensor nodes.