problem with timer clock led code

hey there! there is a code for my uv exposure box! and can anyone help me out with code… i want a code for 12 leds will blink one by one scanning and dividing the time as i inputted by 12 (as a status bar), when my uv exposure timer starts? here, thats all i got (im using atmega 16 in arduino ide… help regarded!

#include <LiquidCrystal.h>
#include <stdio.h>


LiquidCrystal lcd(A0, A1, A2, A3, A4, A5);  

long minutes ;   
long seconds ; 
int countdown = 0;       
int button1 = 9;           
int button2 = 10;           
int button3 = 11;           
int button4 = 12;           

int buzzerPin = 8;
 
int R = A6;
int G = A7;
int B = 8;
boolean startCountdown = false;
int logic1, logic2, logic3, logic4;

void setup()
{ 
  
  pinMode(buzzerPin, OUTPUT);
  lcd.begin(16, 2); 
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("Push Set To Entr"); 
  lcd.setCursor(0, 1);
  lcd.print("Time");
  
  
  Serial.begin(9600);
  pinMode(A6, OUTPUT);
  pinMode(B, OUTPUT);
  pinMode(G, OUTPUT);
}

void splashscreen()
{
    lcd.clear();
    lcd.setCursor(0, 0);
    lcd.print(" Exposure Time"); 
    lcd.setCursor(0, 1);
    lcd.print("* Press SET *"); 
}

void buzzer()
{
  for(int x = 0; x <= 3; x++)
  {
   tone(buzzerPin, 1500, 100);
   delay(200);
   tone(buzzerPin, 1500, 100);
   delay(200);
   tone(buzzerPin, 1500, 100);
   delay(200);
   tone(buzzerPin, 1500, 100);
   delay(200);
  }
}

void uberTime()
{
  countdown = ((minutes * 60) + seconds);
  

  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("Exposing Board");
  lcd.setCursor(0, 1);
  lcd.print("Time:");
  lcd.setCursor(11, 1);
  lcd.print(" _ _");
  for (int timer = countdown; timer >= 0; timer --)
  {
    char buffer[6]; 
    
    sprintf(buffer, "%4d", countdown);
    lcd.setCursor(7, 1);
    lcd.print(buffer);
    delay(1000);
    countdown = countdown - 1;
  }
  
  
  
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print(" ** ALL DONE **");
  lcd.setCursor(0, 1);
  lcd.print("  Press SET");
  buzzer();
  
  logic1 = digitalRead(button1);
  while(logic1 != 0)
  {
    logic1 = digitalRead(button1);
  }
  
  startCountdown = false;
  minutes = 0;
  seconds = 0;
  countdown = 0;
}

void setupTimer()
{
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.blink();
  lcd.print("_ _ : _ _"); 
  lcd.setCursor(0, 1);
  lcd.print("Enter Time");
  delay(3000);
  
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print(" Set Expose Time"); 
  lcd.setCursor(0, 1);
  lcd.print("_ _: ");
  lcd.setCursor(9, 1);
  lcd.print("_ _: ");
  lcd.noBlink();
  
  while(startCountdown == false) 
  { 
    logic2 = analogRead(button2);   
    if (logic2 == 0)                  
    { 
      seconds ++;
      delay(300);
      
       if (seconds >= 60)
       {
         seconds = 0;
         minutes ++;
       }   
    }
   char buffer[3];
   sprintf(buffer, "%10d", seconds); 
   lcd.setCursor(14, 1);
   lcd.print(buffer);
  
   logic1 = digitalRead(button1);
   if (logic1 == 0)                  // MINUTES ADJUST
   {
     minutes ++;
     delay(500);
   }
   
   lcd.setCursor(6, 1);
   lcd.print(minutes);
   
   logic4 = digitalRead(button4);
   if(logic4 == 0)                   // clear timer
   {
     seconds = 0;
     minutes = 0;
   }
   
   logic1 = digitalRead(button1);
   if (logic1 == 0)                  // START             
   {
     startCountdown = true;
     analogWrite(A7, HIGH);
     delay(1000);  
     analogWrite(A7, LOW);
     digitalWrite(8, HIGH);
     delay(1000);
     digitalWrite(8, LOW);

   }
   logic1 = digitalRead(button1);
   if (logic1 == 0) 
   {
     seconds = 0;
     minutes = 0;
  }
  
  }
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("Exposure Start"); 
  lcd.setCursor(0, 1);
  lcd.print("Timer = "); 
  lcd.setCursor(8, 1);
  lcd.print(countdown);
  lcd.setCursor(12, 1);
  lcd.print("Secs");
  
  buzzer();
  uberTime();
}

void loop()
{
  splashscreen();
  logic1 = analogRead(button1);
  logic2 = analogRead(button2);
  logic3 = analogRead(button3);
  
  if (logic1 == 0)                 // SETUP & START BUTTON
  {
    setupTimer();
  }

    Serial.print("button1 = ");
    Serial.print(analogRead(button1));
    Serial.print("   button2 = ");
    Serial.print(analogRead(button2));
    Serial.print("   button3 = ");
    Serial.println(analogRead(button3));
    delay(100);
    analogWrite(R , HIGH);
}

hey there! there is a code for my uv exposure box! and can anyone help me out with code… i want a code for 12 leds will blink one by one scanning and dividing the time as i inputted by 12 (as a status bar), when my uv exposure timer starts? may i use something like scanf to scan the int i inputted? here, thats all i got (im using atmega 16 in arduino ide… help regarded!

#include <LiquidCrystal.h>
#include <stdio.h>


LiquidCrystal lcd(A0, A1, A2, A3, A4, A5);  

long minutes ;   
long seconds ; 
int countdown = 0;       
int button1 = 9;           
int button2 = 10;           
int button3 = 11;           
int button4 = 12;           

int buzzerPin = 8;
 
int R = A6;
int G = A7;
int B = 8;
boolean startCountdown = false;
int logic1, logic2, logic3, logic4;

void setup()
{ 
  
  pinMode(buzzerPin, OUTPUT);
  lcd.begin(16, 2); 
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("Push Set To Entr"); 
  lcd.setCursor(0, 1);
  lcd.print("Time");
  
  
  Serial.begin(9600);
  pinMode(A6, OUTPUT);
  pinMode(B, OUTPUT);
  pinMode(G, OUTPUT);
}

void splashscreen()
{
    lcd.clear();
    lcd.setCursor(0, 0);
    lcd.print(" Exposure Time"); 
    lcd.setCursor(0, 1);
    lcd.print("* Press SET *"); 
}

void buzzer()
{
  for(int x = 0; x <= 3; x++)
  {
   tone(buzzerPin, 1500, 100);
   delay(200);
   tone(buzzerPin, 1500, 100);
   delay(200);
   tone(buzzerPin, 1500, 100);
   delay(200);
   tone(buzzerPin, 1500, 100);
   delay(200);
  }
}

void uberTime()
{
  countdown = ((minutes * 60) + seconds);
  

  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("Exposing Board");
  lcd.setCursor(0, 1);
  lcd.print("Time:");
  lcd.setCursor(11, 1);
  lcd.print(" _ _");
  for (int timer = countdown; timer >= 0; timer --)
  {
    char buffer[6]; 
    
    sprintf(buffer, "%4d", countdown);
    lcd.setCursor(7, 1);
    lcd.print(buffer);
    delay(1000);
    countdown = countdown - 1;
  }
  
  
  
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print(" ** ALL DONE **");
  lcd.setCursor(0, 1);
  lcd.print("  Press SET");
  buzzer();
  
  logic1 = digitalRead(button1);
  while(logic1 != 0)
  {
    logic1 = digitalRead(button1);
  }
  
  startCountdown = false;
  minutes = 0;
  seconds = 0;
  countdown = 0;
}

void setupTimer()
{
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.blink();
  lcd.print("_ _ : _ _"); 
  lcd.setCursor(0, 1);
  lcd.print("Enter Time");
  delay(3000);
  
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print(" Set Expose Time"); 
  lcd.setCursor(0, 1);
  lcd.print("_ _: ");
  lcd.setCursor(9, 1);
  lcd.print("_ _: ");
  lcd.noBlink();
  
  while(startCountdown == false) 
  { 
    logic2 = analogRead(button2);   
    if (logic2 == 0)                  
    { 
      seconds ++;
      delay(300);
      
       if (seconds >= 60)
       {
         seconds = 0;
         minutes ++;
       }   
    }
   char buffer[3];
   sprintf(buffer, "%10d", seconds); 
   lcd.setCursor(14, 1);
   lcd.print(buffer);
  
   logic1 = digitalRead(button1);
   if (logic1 == 0)                  // MINUTES ADJUST
   {
     minutes ++;
     delay(500);
   }
   
   lcd.setCursor(6, 1);
   lcd.print(minutes);
   
   logic4 = digitalRead(button4);
   if(logic4 == 0)                   // clear timer
   {
     seconds = 0;
     minutes = 0;
   }
   
   logic1 = digitalRead(button1);
   if (logic1 == 0)                  // START             
   {
     startCountdown = true;
     analogWrite(A7, HIGH);
     delay(1000);  
     analogWrite(A7, LOW);
     digitalWrite(8, HIGH);
     delay(1000);
     digitalWrite(8, LOW);

   }
   logic1 = digitalRead(button1);
   if (logic1 == 0) 
   {
     seconds = 0;
     minutes = 0;
  }
  
  }
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("Exposure Start"); 
  lcd.setCursor(0, 1);
  lcd.print("Timer = "); 
  lcd.setCursor(8, 1);
  lcd.print(countdown);
  lcd.setCursor(12, 1);
  lcd.print("Secs");
  
  buzzer();
  uberTime();
}

void loop()
{
  splashscreen();
  logic1 = analogRead(button1);
  logic2 = analogRead(button2);
  logic3 = analogRead(button3);
  
  if (logic1 == 0)                 // SETUP & START BUTTON
  {
    setupTimer();
  }

    Serial.print("button1 = ");
    Serial.print(analogRead(button1));
    Serial.print("   button2 = ");
    Serial.print(analogRead(button2));
    Serial.print("   button3 = ");
    Serial.println(analogRead(button3));
    delay(100);
    analogWrite(R , HIGH);
}
void loop()
{
  splashscreen();

Why do you need to display the splash screen on every pass through loop()?

   char buffer[3];
   sprintf(buffer, "%10d", seconds);

No way in hell you are going to fit 11 characters in a 3 element array.

  logic1 = analogRead(button1);
  logic2 = analogRead(button2);
  logic3 = analogRead(button3);

So you can read how hard the switch is pressed? Switches are digital!

oops… that would be something like this!

#include <LiquidCrystal.h>
#include <stdio.h>


LiquidCrystal lcd(A0, A1, A2, A3, A4, A5);  

long minutes = 0;   
long seconds = 0; 
int countdown = 0;       
int button1 = 9;           
int button2 = 10;           
int button3 = 11;           
int button4 = 12;           
int LRP1 = 15;
int LRP2 = 0;
int LRP3 = 1;
int LRP4 = 2;
int LRP5 = 3;
int LRP6= 4;
int LRP7 = 5;
int LRP8 = 6;
int LRP9 = 7;
int LRP10 = 23;
int LRP11 = 22;
int LRP12 = 21;
int buzzerPin = 16;
 
int R = A6;
int G = A7;
int B = 8;
boolean startCountdown = false;
int logic1, logic2, logic3, logic4;

void setup()
{ 
  pinMode(15, OUTPUT);
  pinMode(0, OUTPUT);
  pinMode(1, OUTPUT);
  pinMode(2, OUTPUT);
  pinMode(3, OUTPUT);
  pinMode(4, OUTPUT);
  pinMode(5, OUTPUT);
  pinMode(6, OUTPUT);
  pinMode(7, OUTPUT);
  pinMode(23, OUTPUT);
  pinMode(22, OUTPUT);
  pinMode(21, OUTPUT);
  pinMode(buzzerPin, OUTPUT);
  lcd.begin(16, 2); 
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("Push Set To Entr"); 
  lcd.setCursor(0, 1);
  lcd.print("Time");

  
  Serial.begin(9600);
  pinMode(A6, OUTPUT);
  pinMode(B, OUTPUT);
  pinMode(G, OUTPUT);
}

void splashscreen()
{
    lcd.clear();
    lcd.setCursor(0, 0);
    lcd.print(" Exposure Time"); 
    lcd.setCursor(0, 1);
    lcd.print("* Press SET *"); 
}

void buzzer()
{
  for(int x = 0; x <= 15; x++)
  {
   tone(buzzerPin, 1500, 100);
   delay(200);
   tone(buzzerPin, 1500, 100);
   delay(200);
   tone(buzzerPin, 1500, 100);
   delay(200);
   tone(buzzerPin, 1500, 100);
   delay(200);
  }
}

void uberTime()
{
  countdown = ((minutes * 60) + seconds);
  

  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("Exposing Board");
  lcd.setCursor(0, 1);
  lcd.print("Time:");
  lcd.setCursor(11, 1);
  lcd.print(" _ _");
  for (int timer = countdown; timer >= 0; timer --)
  {
    char buffer[6]; 
    
    sprintf(buffer, "%2d", countdown);
    lcd.setCursor(7, 1);
    lcd.print(buffer);
    delay(1000);
    countdown = countdown - 1;
  }
  
  
  
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print(" ** ALL DONE **");
  lcd.setCursor(0, 1);
  lcd.print("  Press SET");
  buzzer();
  
  logic1 = digitalRead(button1);
  while(logic1 != 0)
  {
    logic1 = digitalRead(button1);
  }
  
  startCountdown = false;
  minutes = 0;
  seconds = 0;
  countdown = 0;
}

void setupTimer()
{
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("_ _ : _ _"); 
  lcd.setCursor(0, 1);
  lcd.print("Enter Time");
  delay(3000);
  
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print(" Set Expose Time"); 
  lcd.setCursor(0, 1);
  lcd.print("_ _: ");
  lcd.setCursor(9, 1);
  lcd.print("_ _: ");
  
  while(startCountdown == false) 
  { 
    logic2 = analogRead(button2);   
    if (logic2 == 0)                  
    { 
      seconds ++;
      delay(300);
      
       if (seconds >= 60)
       {
         seconds = 0;
         minutes ++;
       }   
    }
   char buffer[3];
   sprintf(buffer, "%2d", seconds); 
   lcd.setCursor(14, 1);
   lcd.print(buffer);
  
   logic1 = digitalRead(button1);
   if (logic1 == 0)                  // MINUTES ADJUST
   {
     minutes ++;
     delay(500);
   }
   
   lcd.setCursor(6, 1);
   lcd.print(minutes);
   
   logic4 = digitalRead(button4);
   if(logic4 == 0)                   // clear timer
   {
     seconds = 0;
     minutes = 0;
   }
   
   logic1 = digitalRead(button1);
   if (logic1 == 0)                  // START             
   {
     startCountdown = true;
     analogWrite(A7, HIGH);
     delay(1000);  
     analogWrite(A7, LOW);
     digitalWrite(8, HIGH);
     delay(1000);
     digitalWrite(8, LOW);

   }
   logic1 = digitalRead(button1);
   if (logic1 == 0) 
   {
     seconds = 0;
     minutes = 0;
  }
  
  }
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("Exposure Start"); 
  lcd.setCursor(0, 1);
  lcd.print("Timer = "); 
  lcd.setCursor(8, 1);
  lcd.print(countdown);
  lcd.setCursor(12, 1);
  lcd.print("Secs");
  
  buzzer();
  uberTime();
}

void loop()
{
  
  logic1 = digitalRead(button1);
  logic2 = digitalRead(button2);
  logic3 = digitalRead(button3);
  
  if (logic1 == 0)                 // SETUP & START BUTTON
  {
    setupTimer();
  }

    Serial.print("button1 = ");
    Serial.print(digitalRead(button1));
    Serial.print("   button2 = ");
    Serial.print(digitalRead(button2));
    Serial.print("   button3 = ");
    Serial.println(digitalRead(button3));
    delay(100);
    analogWrite(R , HIGH);
}

oops... that would be something like this!

In your dreams...

  while(startCountdown == false) 
  { 
    logic2 = analogRead(button2);
    analogWrite(R , HIGH);

A6 is not a PWM pin. Even if it was, why you would want to write 1 to it is a mystery.

The code you posted does something. You haven't bothered to explain what. You want it to do something. You haven't bothered to explain what.

Rather hard to help you get from point A to point B without knowing where points A and B are.