lcd + stepper motor

hi guys i have this programme that allows me to push a button to start a mouvement and stoppage of a stepper motor for a certain amount of times example: motor move for: 20 seconds then stop for 10 seconds then move for 4 seconds then stop for 30 seconds etc… “move” is doing few steps cw and ccw
now i want to add an lcd so that when i press the bouton it show that he is in state of movement and countdown for time and when in stoppage show stoppage and cowntdown… im very bad at coding and i don’t know how to do it i only find “hello world” examples in the internet here is my code :

#include <elapsedMillis.h> 
#include <StepperDriver.h>
int motor_steps = 200;  //
int step_divisition = 1;
int en_pin = 6;
int cw_pin = 4;
int clk_pin = 5;
unsigned int period =3000;
unsigned int period2 = 4000; 
unsigned int period3 =2000;
unsigned int period4 =2000;
const int buttonPin = 8;
//int buttonState = 0;
int buttonPushCounter = 0;   // counter for the number of button presses
int buttonState = LOW;         // current state of the button
int lastButtonState = 0;     // previous state of the button
//long tempsmouv =
//long tempsarret = 
StepperDriver ss(motor_steps, step_divisition, en_pin, cw_pin, clk_pin);
 void mouvement(){ 
      ss.setSpeed(150);
      ss.step(300);
      delay(400);
      ss.step(-300);
      delay(400);
      }

void arret(){ 
      ss.setSpeed(0);
     }

void setup() {
  // put your setup code here, to run once:
pinMode(buttonPin, INPUT);
Serial.begin(9600);
 /*while( digitalRead(buttonPin) == HIGH );
 delay( 20 ); // because I am NOT going to explain debounce here
 while( digitalRead( buttonPin ) == LOW );  // release to end this loop
 Serial.println("bouton is pushed");*/
 
}
 void loop() {  
  buttonState = digitalRead(buttonPin);


  // compare the buttonState to its previous state
  if (buttonState != lastButtonState) {
    // if the state has changed, increment the counter
    if (buttonState == HIGH) {
     buttonPushCounter++;
 
elapsedMillis timeElapsed;
    while(timeElapsed < period) {
    Serial.println("test1");
    mouvement();
    }
   elapsedMillis timeElapsed2;
    while(timeElapsed2 < period2 ) {
    Serial.println("test2");
   arret();
    }
    elapsedMillis timeElapsed3;
       while(timeElapsed3 < period3 ) {
    Serial.println("test1");
    mouvement();
    }  
    elapsedMillis timeElapsed4;
    while(timeElapsed4 < period4 ) {
    Serial.println("test2");
   arret();
    }
  }
  while(1);
 }
 }

i only find "hello world" examples in the internet

Start by printing "hello world" in loop()

I am not familiar with the stepper library you are using but I suspect this approach to programming is not going to allow the display of a countdown of motor steps because (I suspect) this line (for example)

ss.step(300);

will do all 300 steps before allowing anything else to happen

To operate a display of steps you need non-blocking code that only does one step at a time and allows other things to happen between steps.

Have a look at the AccelStepper library

...R
Stepper Motor Basics
Simple Stepper Code

i did add the accelstepper library but i don't know how to do the same code as my old stepper library and i also don't know how to identify the pins because im using an A4988 driver

 ss.setSpeed(150);
      ss.step(300);
      delay(400);
      ss.step(-300);
      delay(400);

CactusJack:
i did add the accelstepper library but i don't know how to do the same code as my old stepper library

Start with the examples from the AccelStepper library and make sure you understand how it works. Focus, especially, on the non-blocking run() or runSpeed() functions.

The general idea is that you specify the number of steps to move and then repeatedly call run(). When the motor gets all the steps done it will stop even though the program continues to call run(). The function distanceToGo() will tell you how many steps still need to be made.

Use the DRIVER option to specify your step and direction pins.

...R

i can't seem to find the driver fonction and i didn't find anything on the accel stepper class reference on how to set the pins for the driver in the code before the void setup for my other stepperdriver.h library i used to put this

int motor_steps = 200;  //
int step_divisition = 1;
int en_pin = 1;
int cw_pin = 6;
int clk_pin = 7;

StepperDriver ss(motor_steps, step_divisition, en_pin, cw_pin, clk_pin);

i didn't find anything on the accel stepper class reference on how to set the pins for the driver in the code before the void setup

Did you look at any of the examples ?