added the functions to sensors.pde