The proposed project focuses on the development of a focus-tunable Shack–Hartmann wavefront sensor (SHWS), a novel device designed to overcome the limitations of conventional, static wavefront sensors. The core scientific problem addressed is the inflexibility of existing sensors, which have a fixed microlens array geometry. This rigidity restricts their dynamic range and spectral efficiency, making them suboptimal for analyzing phase fluctuations in diverse atmospheric conditions and across various wavelengths. The innovation of this project lies in creating a reconfigurable sensor where the focal length of the microlens array can be adjusted. This is achieved through a precision mechanical assembly that allows for controlled movement of the lenslet array relative to the detector plane. By modifying this distance, along with other parameters such as the lenslet pitch and anti-reflective coatings, the sensor's characteristics can be dynamically tuned. This adaptability provides several key advantages. It enables the analysis of wavefront distortions over a wider dynamic range, allowing the sensor to effectively measure both weak and strong phase aberrations caused by atmospheric turbulence. Furthermore, the ability to optimize the optics for different spectral bands enhances its performance in free-space optical communications, where signal integrity is paramount. For adjustment of the microlens array position, the thread-to-thread adapter is used, where you can manually rotate one part of the mechanical segment and thereby change the distance between the sensor and lenslet plane. As a criterion for the appropriate microlens position, the diffraction-limited spot size in the focal plane is used.