Raspberry with 16×2 display without potentiometer

I would like to use a 16×2 display with a raspberry. All the schemes found by me require 1 or 2 potentiometers.
I would like to find a way to NOT use this element or to simulate this element by code.

Enter image description here

Help is appreciated.