Create PID using optical shaft encoder