Get value after increment

How can i get the initial value after increment or dircrement. :confused:

Not sure exactly what you mean, but sounds like you should save the value into another variable called say oldValue before you change it?

#include <Wire.h>
#include <LCD.h>
#include <LiquidCrystal_I2C.h>
#include <Servo.h>

#define I2C_ADDR    0x3F

LiquidCrystal_I2C  lcd(I2C_ADDR,2, 1, 0, 4, 5, 6, 7);


unsigned long prevMillis;

int count = 10;
int minute = 11;
int counter = 0; // initial amount of presses


// ONE TIME RUN
void setup() {
  lcd.begin (16,4);    // Inicializar el display con 16 caraceres 2 lineas
  lcd.setBacklightPin(3,POSITIVE);
  lcd.setBacklight(HIGH);

  // Print a message to the LCD.
  lcd.setCursor(2,2);
  lcd.print(":");
  prevMillis = millis();  // get the time at the start

}

// REPEATED RUN
void loop() {
  Serial.begin(9600);
     countdown();

}

void countdown() {

    delay(150);
    unsigned long curMillis = millis();
    

  if(curMillis - prevMillis >= 1000){
    count -= 1;
    
    lcd.setCursor(3,2);
    lcd.print(count);
    
    prevMillis += 1000;
    
   if (count<10){
    lcd.setCursor(3,2);
    lcd.print("0");

    lcd.setCursor(4,2);
    lcd.print(count);
    }
    
    if(minute<10){
    lcd.setCursor(1,2);
    lcd.print(minute);
    lcd.setCursor(0,2);
    lcd.print("0");
    }

    if(minute>9){
    lcd.setCursor(0,2);
    lcd.print(minute);
    }
 
    }
    
      if(count == 0){
        minute -= 1;
        count = 10;
        }
      
}

what i want is after variable “minute” reaches cero its initial value to be 11 again.

    if(minute == 0){
        
        minute =[i] initial value[/i];
        }

Can't you just say....

if(minute == 0)
 {
    minute =11;
  }

?

Yes, but the thing is that "minute" will be any number. I can adjust the number with a push button increasing or decreasing. But thank you for you answer i found out that i can create two variables with the same value. By the way, can you rate my english? xD