Updated code so it works with the pololu motorcontroller