Correct me if I am wrong - doesnt the PWM command with the Basic Atom take 4 parameters
PWM pin, period, duty, cycles (page 110 of manual)
where
pin is the pin to use
period is the period of the pulse width in microseconds
duty is the duty of pulse width signal in microseconds
cycles is the number of pulses to output
Take a look at this as possible source of troubles
Additionally - are you using lithium batteries - otherwise pin 3 should be up and not down. the repurcussions of this are not known by I but could explain anomolies.
Are you using an RC filter? You didn’t mention it. I thought that was necessary when using PWM to control motors with the Sabertooth. If not, read the Sabertooth manual for more information.
The PWM command only runs for as long as you specify in the command and nothign else can run while it’s running.
I’d definitely suggest HPWM instead. You’ll get continuous pwm signals in the background without messing with your main program.
Also PWM(on the BasicAtom and MBasic, not AtomPro) is not a on off PWM(on x% off y%). it is a time sliced average on x% and off y%. It’s fine for voltage generation(using a filter) but not good for devices that need a true pwm signal. HPWM generates a true pwm signal.