Hi 221970 (Are you one of those Beagle Boys ?), welcome.
Please take some time to read the forum manual (click !).
It explains how (and why) you can help us help you.
I took the effort to download your code and have a look at it.
This was an unnecessary step, because the code is short enough to read it in your post:
#include <Sabertooth.h>
Sabertooth ST(128);
bool go = true;
const unsigned long interval = 20;
unsigned long previousTime = 0;
void setup()
{
SabertoothTXPinSerial.begin(9600);
ST.autobaud();
}
void loop()
{
int power;
unsigned long currentTime = millis();
for (power = 0; power <= 127; power ++)
{
if (currentTime - previousTime >= interval) {
ST.motor(1, power);
previousTime = currentTime;
}
}
}
I have no idea what this sabertooth thing is, but it seems to do some serial communication.
Using millis() AKA blink without delay(), isn't just about avoiding the use of delay().
The code you built this far tells me you didn't get what "blink without delay" really is about.
So before anything else, study that sketch (blink without delay, it's in the examples that came with your IDE), make changes to it and see what those changes do (and why they do not work as you expected, which will teach you a lot).
Delay is known as a blocking code, because once this starts, your Arduino will do nothing else than breathe and have a heartbeat while watching the clock as times passes.
But it is not the only way to create a blocking code.
Codes that will lock in a loop are also blocking.
And that is exactly what you are doing in the very small piece of code you're showing here.
This makes it totally useless to use millis within your for loop.
Delay(), a for.. loop and a while.. loop are typical examples of blocking code and i'm sure that there many, many more of those.
Once you've really mastered the blink without delay example, you'll see how this can be a real problem in much larger sketches.
Nevertheless, your problem is that you are watching the clock and make a note of the time, then keep watching your note to try to see whether the wanted time has already passed.
How often do you expect the contents of your note to change ?
Once again; solving the problem in the paragraph above, doesn't solve the problem you wanted to attack.
It will need for you to rethink how to build sketches in an efficient way.
Start practising / learning today, because you will need it in every sketch you'll build in your future Arduino career.
Lots of success !