Blue Bridge Cup PWM wave output and input capture code