  AOLI (Adaptive Optics Lucky Imager) is a state-of-art instrument that
combines adaptive optics (AO) and lucky imaging (LI) with the objective of
obtaining diffraction limited images in visible wavelength at mid- and big-size
ground-based telescopes. The key innovation of AOLI is the development and use
of the new TP3-WFS (Two Pupil Plane Positions Wavefront Sensor). The TP3-WFS,
working in visible band, represents an advance over classical wavefront sensors
such as the Shack-Hartmann WFS (SH-WFS) because it can theoretically use
fainter natural reference stars, which would ultimately provide better sky
coverages to AO instruments using this newer sensor. This paper describes the
software, algorithms and procedures that enabled AOLI to become the first
astronomical instrument performing real-time adaptive optics corrections in a
telescope with this new type of WFS, including the first control-related
results at the William Herschel Telescope (WHT).
