AFMotor shield - PWM strangely getting interrupted by sketch code