Getting clean/smooth data from a sensor