What if you get ? on serial monitor

Nobody can truly say, without looking at your schematic and knowing the details of the sensor. Did you not try blocking the light from the environment?