Sensor for Weed Detection Based on Spectral Measurements