Issues with Millis function and sensors

Thanks J-M-L I will try to bring a schematic for to explain the connections