I have a sensor monitoring angle. According to the value of this angle i need to use a software PID controller to control an electrical current. Anyone has any idea of a general algorithm preferably in Pascal? If not, any web sites that may be useful?