A spectrometer based on smartphones and a low-cost kit for transmittance and absorbance measurements in real-time