Adjusted check for photo value to and main for the calibration function