From Edward with the initial code: However, I would like to bring up that in the newer design, instead of use up all 4 PWM channels with 4 pin controlling the motor, we decided to use only 2 pwm pins controlling the enabled pin and 4 other pins controlling the directions of the motor -- a total 6 pins been taking up controlling the motors but we are left with 2 more pwm pins.