Domanda di colloquio di Tesla

Write pseudo code for implementing a control loop. [interesting, but good question for an analog engineer]