A PID controller in Python