Solid state TiO2 photosensor for environment and food control