Rotate stepper once every 10 min

I am new to arduino, so do not be so harsh, please.
I have 17... stepper motor and L298N driver connected to UNO.
All test programs run OK. I would like to modify oneRevolution sketch to run every 10 min.
I can do it with delay(), but do not see how to do it with millis().
I understand how its done in Blink without delay example, but in oneRevolution sketch there are no direct control for pins. Is it possible to modify it, or is there any other sketch that I can modify or use as is.
Please, steer me somewhere.

The demo Several Things at a Time illustrates the use of millis() to manage timing without blocking. It may help with understanding the technique.

It will also make things easier to manage if you put the code to move the servo into a function that can be called when the 10 minute interval expires.

By the way, I am assuming you want the motor to do one quick revolution every 10 minutes and stay stationary for the rest of the time.

On the other hand if you want the motor to move very slowly so that it takes a full 10 minutes to move 200 steps (1 revolution) then you could modify the second example in this Simple Stepper Code by increasing the value in the variable millisBetweenSteps

...R
Stepper Motor Basics

Thank you for the quick responses. It helped me indeed.

I made it work, maybe not the most elegant way. If you can give some critical comments I would appreciate it.
It does two time sweep back and forth (2 min total time) with pause between next cycle for 2 min.

/*
 Stepper Motor Control - cycle of one revolution forward,
 one- backward. Two cycles total with 2 min pause.
 This program drives a unipolar or bipolar stepper motor.
 The motor is attached to digital pins 8 - 11 of the Arduino.

 The motor should revolve one revolution in one direction, then
 one revolution in the other direction then repeat and wait for 2 min before starting again
 */

#include <Stepper.h>

const int stepsPerRevolution = 200;  

// initialize the stepper library on pins 8 through 11:
Stepper myStepper(stepsPerRevolution, 8, 9, 10, 11);
unsigned long previousMillis = 0;        // will store last time myStepper.step was updated
long OnTime = 1000;           // milliseconds of on-time
long OffTime = 240000;          // milliseconds of off-time
void setup() {
  myStepper.setSpeed(2);// set the speed at 2 rpm
}

void loop() {
 unsigned long currentMillis = millis(); 
  // check to see if it's time to change the state of the myStepper.step
   if(currentMillis - previousMillis >= OnTime)
   {myStepper.step(0);
   }
else 
{ 
myStepper.step(200);
  delay(500);
  myStepper.step(-200);
  delay(500);
  myStepper.step(200);
  delay(500);
  myStepper.step(-200);
  delay(500);
  }
if(currentMillis - previousMillis >= OffTime)
  { previousMillis = currentMillis;}
     
}

/*

stepper_oneRevolution_modif.ino (1.27 KB)