Changing page in Arduino TFT after a given time (in seconds)

Good day! I'm currently working on a project that involves the use of a TFT touch screen module.

For this phase, I want achieve a function in which after a given time (6 seconds), the landingpage() changes to the setup() page, both variables serve as the two different interface of my TFT touch screen.

How can I achieve it?

Here is the code for reference:

#include <Adafruit_TFTLCD.h>
#include <TouchScreen.h>
#include <Adafruit_GFX.h>

// define the pins used to communicate with the display
#define LCD_CS   A3
#define LCD_CD   A2
#define LCD_WR   A1
#define LCD_RD   A0
#define LCD_RESET   A4

#define TS_MINX 122
#define TS_MINY 111
#define TS_MAXX 942
#define TS_MAXY 890

#define YP A3
#define XM A2
#define YM 9
#define XP 8

// Color definitions
#define BLACK           0x0000
#define BLUE            0x001F
#define RED             0xF800
#define GREEN           0x07E0
#define CYAN            0x07FF
#define MAGENTA         0xF81F
#define YELLOW          0xFFE0 
#define WHITE           0xFFFF

// create an instance of the TFT display object
Adafruit_TFTLCD tft(LCD_CS, LCD_CD, LCD_WR, LCD_RD, LCD_RESET);

TouchScreen ts = TouchScreen(XP, YP, XM, YM, 364);

boolean buttonEnabled = true;

float balance = 10000.0;

void setup() {
  Serial.begin(9600);
  tft.reset();
  uint16_t identifier = tft.readID();
  tft.begin(identifier);
  tft.setRotation(1);
  tft.fillScreen(BLUE);

  tft.setCursor(205,30);
  tft.setTextColor(YELLOW);
  tft.setTextSize(3);
  tft.print("MENU");

  // dishOne
  tft.fillRect(20,80, 80, 40, MAGENTA);
  tft.drawRect(20,80,80,40,BLACK);
  tft.setCursor(30,90);
  tft.setTextColor(WHITE);
  tft.setTextSize(1);
  tft.print("ADOBO");
  tft.setCursor(30,100);
  tft.setTextColor(WHITE);
  tft.setTextSize(1);
  tft.print("PHP 50.00");

  // dishTwo
  tft.fillRect(110,80, 80, 40, MAGENTA);
  tft.drawRect(110,80,80,40,BLACK);
  tft.setCursor(120,90);
  tft.setTextColor(WHITE);
  tft.setTextSize(1);
  tft.print("SINIGANG");
  tft.setCursor(120,100);
  tft.setTextColor(WHITE);
  tft.setTextSize(1);
  tft.print("PHP 45.00");

  // dishThree
  tft.fillRect(200,80, 80, 40, MAGENTA);
  tft.drawRect(200,80,80,40,BLACK);
  tft.setCursor(210,90);
  tft.setTextColor(WHITE);
  tft.setTextSize(1);
  tft.print("TULINGAN");
  tft.setCursor(210,100);
  tft.setTextColor(WHITE);
  tft.setTextSize(1);
  tft.print("PHP 55.00");

  // dishSeven
  tft.fillRect(20,180, 80, 40, MAGENTA);
  tft.drawRect(20,180,80,40,BLACK);
  tft.setCursor(30,190);
  tft.setTextColor(WHITE);
  tft.setTextSize(1);
  tft.print("SIOMAI");
  tft.setCursor(30,200);
  tft.setTextColor(WHITE);
  tft.setTextSize(1);
  tft.print("PHP 20.00");

  // dishEight
  tft.fillRect(110,180, 80, 40, MAGENTA);
  tft.drawRect(110,180,80,40,BLACK);
  tft.setCursor(120,190);
  tft.setTextColor(WHITE);
  tft.setTextSize(1);
  tft.print("MENUDO");
  tft.setCursor(120,200);
  tft.setTextColor(WHITE);
  tft.setTextSize(1);
  tft.print("PHP 50.00");

  // dishNine
  tft.fillRect(200,180, 80, 40, MAGENTA);
  tft.drawRect(200,180,80,40,BLACK);
  tft.setCursor(210,190);
  tft.setTextColor(WHITE);
  tft.setTextSize(1);
  tft.print("TINOLA");
  tft.setCursor(210,200);
  tft.setTextColor(WHITE);
  tft.setTextSize(1);
  tft.print("PHP 50.00");

  // dishFour
  tft.fillRect(20,130, 80, 40, MAGENTA);
  tft.drawRect(20,130,80,40,BLACK);
  tft.setCursor(30,140);
  tft.setTextColor(WHITE);
  tft.setTextSize(1);
  tft.print("CHICKEN");
  tft.setCursor(30,150);
  tft.setTextColor(WHITE);
  tft.setTextSize(1);
  tft.print("PHP 45.00");

  // dishFive
  tft.fillRect(110,130, 80, 40, MAGENTA);
  tft.drawRect(110,130,80,40,BLACK);
  tft.setCursor(120,140);
  tft.setTextColor(WHITE);
  tft.setTextSize(1);
  tft.print("AFRITADA");
  tft.setCursor(120,150);
  tft.setTextColor(WHITE);
  tft.setTextSize(1);
  tft.print("PHP 55.00");

  // dishSix
  tft.fillRect(200,130, 80, 40, MAGENTA);
  tft.drawRect(200,130,80,40,BLACK);
  tft.setCursor(210,140);
  tft.setTextColor(WHITE);
  tft.setTextSize(1);
  tft.print("KARE-KARE");
  tft.setCursor(210,150);
  tft.setTextColor(WHITE);
  tft.setTextSize(1);
  tft.print("PHP 55.00");
}

void loop() 
  {

  tft.setCursor(20,20);
  tft.setTextColor(WHITE);
  tft.setTextSize(1);
  tft.print("YOUR BALANCE: ");

  tft.setCursor(105,20);
  tft.setTextColor(WHITE);
  tft.setTextSize(1);
  tft.print(balance);
  
  TSPoint p = ts.getPoint();
  
  if (p.z > ts.pressureThreshhold)

  {  
   p.x = map(p.x, TS_MAXX, TS_MINX, 0, 320);
   p.y = map(p.y, TS_MAXY, TS_MINY, 0, 480);
       
   if(p.x > 20 && p.x < 60 && p.y > 80 && p.y < 160 && buttonEnabled)
   {    
    buttonEnabled = false;
    
    pinMode(XM, OUTPUT);
    pinMode(YP, OUTPUT);

    dishNine(); // draw the ninth dish 
   }

   if(p.x > 110 && p.x < 150 && p.y > 80 && p.y < 160 && buttonEnabled)
   {    
    buttonEnabled = false;
    
    pinMode(XM, OUTPUT);
    pinMode(YP, OUTPUT);

    dishSix(); // draw the sixth dish 
   }

    if(p.x > 200 && p.x < 240 && p.y > 80 && p.y < 160 && buttonEnabled)
   {    
    buttonEnabled = false;
    
    pinMode(XM, OUTPUT);
    pinMode(YP, OUTPUT);

    dishThree(); // draw the third dish 
   }

   if(p.x > 20 && p.x < 60 && p.y > 180 && p.y < 280 && buttonEnabled)
   {    
    buttonEnabled = false;
    
    pinMode(XM, OUTPUT);
    pinMode(YP, OUTPUT);

    dishEight(); // draw the eight dish 
   }

   if(p.x > 110 && p.x < 150 && p.y > 180 && p.y < 280 && buttonEnabled)
   {    
    buttonEnabled = false;
    
    pinMode(XM, OUTPUT);
    pinMode(YP, OUTPUT);

    dishFive(); // draw the fifth dish 
   }

   if(p.x > 200 && p.x < 240 && p.y > 180 && p.y < 280 && buttonEnabled)
   {    
    buttonEnabled = false;
    
    pinMode(XM, OUTPUT);
    pinMode(YP, OUTPUT);

    dishTwo(); // draw the second dish 
   }

   if(p.x > 20 && p.x < 60 && p.y > 300 && p.y < 460 && buttonEnabled)
   {    
    buttonEnabled = false;
    
    pinMode(XM, OUTPUT);
    pinMode(YP, OUTPUT);

    dishSeven(); // draw the seventh dish 
   }

   if(p.x > 110 && p.x < 150 && p.y > 300 && p.y < 460 && buttonEnabled)
   {    
    buttonEnabled = false;
    
    pinMode(XM, OUTPUT);
    pinMode(YP, OUTPUT);

    dishFour(); // draw the fourth dish 
   }

   if(p.x > 200 && p.x < 240 && p.y > 300 && p.y < 460 && buttonEnabled)
   {    
    buttonEnabled = false;
    
    pinMode(XM, OUTPUT);
    pinMode(YP, OUTPUT);

    dishOne(); // draw the first dish 
   }
  }
}

void landingPage() {
  tft.fillScreen(BLUE);
    
  tft.setCursor(40,50);
  tft.setTextColor(YELLOW);
  tft.setTextSize(2);
  tft.print("Your order has been");
    
  tft.setCursor(100,70);
  tft.setTextColor(YELLOW);
  tft.setTextSize(2);
  tft.print("recieved.");    

  tft.setCursor(20,110);
  tft.setTextColor(WHITE);
  tft.setTextSize(2);
  tft.print("If you made a mistake,");
    
  tft.setCursor(50,130);
  tft.setTextColor(WHITE);
  tft.setTextSize(2);
  tft.print("please inform us");    
    
  tft.setCursor(80,150);
  tft.setTextColor(WHITE);
  tft.setTextSize(2);
  tft.print("immediately.");

  tft.setCursor(60,200);
  tft.setTextColor(YELLOW);
  tft.setTextSize(1);
  tft.print("(C) 2023 CALAMBA CITY SCIENCE");  

  tft.setCursor(90,210);
  tft.setTextColor(YELLOW);
  tft.setTextSize(1);
  tft.print("INTEGRATED SCHOOL");
}

void dishNine() {
  Serial.print("TINOLA  ");
  Serial.print("\t");
  delay(1000); 
  Serial.println("Php 50.00"); // cost
  balance = balance - 50; //subtract the cost from the balance
  
  landingPage();
}

void dishSix() {
  Serial.print("KARE-KARE");
  Serial.print("\t");
  delay(1000);
  Serial.println("Php 55.00"); // cost
  balance = balance - 55; //subtract the cost from the balance
  
  landingPage(); 
}

void dishThree() {
  Serial.print("TULINGAN");
  Serial.print("\t");
  delay(1000);
  Serial.println("Php 55.00"); // cost
  balance = balance - 55; //subtract the cost from the balance
  
  landingPage(); 
}

void dishEight() {
  Serial.print("MENUDO  ");
  Serial.print("\t");
  delay(1000);
  Serial.println("Php 50.00"); // cost
  balance = balance - 50; //subtract the cost from the balance

  landingPage(); 
}

void dishFive() {
  Serial.print("AFRITADA");
  Serial.print("\t");
  delay(1000);
  Serial.println("Php 55.00"); // cost
  balance = balance - 55; //subtract the cost from the balance
  
  landingPage(); 
}

void dishTwo() {
  Serial.print("SINIGANG");
  Serial.print("\t");
  delay(1000);
  Serial.println("Php 45.00"); // cost
  balance = balance - 45; //subtract the cost from the balance
  
  landingPage();
}

void dishSeven() {
  Serial.print("SIOMAI  ");
  Serial.print("\t");
  delay(1000);
  Serial.println("Php 20.00"); // cost
  balance = balance - 20; //subtract the cost from the balance
  
  landingPage();
}

void dishFour() {
  Serial.print("CHICKEN  ");
  Serial.print("\t");
  delay(1000);
  Serial.println("Php 45.00"); // cost
  balance = balance - 45; //subtract the cost from the balance
  
  landingPage();
}

void dishOne() {
  Serial.print("ADOBO  ");
  Serial.print("\t");
  delay(1000);
  Serial.println("Php 50.00"); // cost
  balance = balance - 50; //subtract the cost from the balance
  
  landingPage();
}

Here is the setup() page:

Here is the landingpage() page:

Put all your current TFT stuff in a function with a sensible name. Call it when needed.
Put you landing page in a function and call it when needed.

The timing can be a simple blocking delay between the two calls or more fancy with a non-blocking millis() approach; thise depends on your further needs.

Repeating @sterretje advice about your current project to put all your TFT into a function, and adding in your future projects use void setup() for configuring your hardware, for example, Serial.begin(9600); and tft.begin(identifier); for library or other calls that are only done at the beginning of the sketch.

After void setup() configures your hardware, use void loop() for timing the other function calls like landingPage() and `dishNine(), which only need to be called at specific times.

Doing this will allow you to add or remove features without taking your existing (working) code apart to fit or remove something.

Write your programs how you want, but making them modular will help you in the future.

/*
  Title, instructions
*/

#include ..... // identify libraries for the hardware
#define ... // identify hardware
int ... // identify global variables
Adafruit_TFTLCD tft(LCD_CS, LCD_CD, LCD_WR, LCD_RD, LCD_RESET);
TouchScreen ts = TouchScreen(XP, YP, XM, YM, 364);

void setup() {
  // configure identified hardware
  Serial.begin(9600);

  tft.reset();
  uint16_t identifier = tft.readID();
  tft.begin(identifier);

  welcome(); // call functions that only get used once
}

void loop() {
  if (seconds == 6)
    landingPage(); // control when functions are called
  thisFunction (receivesThisValue); // send values to use inside functions
}

void welcome() { // use function to keep the main loop easy to read.
  Serial.println("Hello, World!");

Can you clarify what is this?

give this a go..

#include <Adafruit_TFTLCD.h>
#include <TouchScreen.h>
#include <Adafruit_GFX.h>

// define the pins used to communicate with the display
#define LCD_CS   A3
#define LCD_CD   A2
#define LCD_WR   A1
#define LCD_RD   A0
#define LCD_RESET   A4

#define TS_MINX 122
#define TS_MINY 111
#define TS_MAXX 942
#define TS_MAXY 890

#define YP A3
#define XM A2
#define YM 9
#define XP 8

// Color definitions
#define BLACK           0x0000
#define BLUE            0x001F
#define RED             0xF800
#define GREEN           0x07E0
#define CYAN            0x07FF
#define MAGENTA         0xF81F
#define YELLOW          0xFFE0
#define WHITE           0xFFFF

// create an instance of the TFT display object
Adafruit_TFTLCD tft(LCD_CS, LCD_CD, LCD_WR, LCD_RD, LCD_RESET);

TouchScreen ts = TouchScreen(XP, YP, XM, YM, 364);

boolean buttonEnabled = true;

float balance = 10000.0;

void setup() {
  Serial.begin(9600);
  tft.reset();
  uint16_t identifier = tft.readID();
  tft.begin(identifier);
  tft.setRotation(1);
  //show the menu..
  ShowMenu();

}


void loop()
{


  TSPoint p = ts.getPoint();

  if (p.z > ts.pressureThreshhold)

  {
    p.x = map(p.x, TS_MAXX, TS_MINX, 0, 320);
    p.y = map(p.y, TS_MAXY, TS_MINY, 0, 480);

    if (p.x > 20 && p.x < 60 && p.y > 80 && p.y < 160 && buttonEnabled)
    {
      buttonEnabled = false;

      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      dishNine(); // draw the ninth dish
    }

    if (p.x > 110 && p.x < 150 && p.y > 80 && p.y < 160 && buttonEnabled)
    {
      buttonEnabled = false;

      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      dishSix(); // draw the sixth dish
    }

    if (p.x > 200 && p.x < 240 && p.y > 80 && p.y < 160 && buttonEnabled)
    {
      buttonEnabled = false;

      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      dishThree(); // draw the third dish
    }

    if (p.x > 20 && p.x < 60 && p.y > 180 && p.y < 280 && buttonEnabled)
    {
      buttonEnabled = false;

      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      dishEight(); // draw the eight dish
    }

    if (p.x > 110 && p.x < 150 && p.y > 180 && p.y < 280 && buttonEnabled)
    {
      buttonEnabled = false;

      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      dishFive(); // draw the fifth dish
    }

    if (p.x > 200 && p.x < 240 && p.y > 180 && p.y < 280 && buttonEnabled)
    {
      buttonEnabled = false;

      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      dishTwo(); // draw the second dish
    }

    if (p.x > 20 && p.x < 60 && p.y > 300 && p.y < 460 && buttonEnabled)
    {
      buttonEnabled = false;

      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      dishSeven(); // draw the seventh dish
    }

    if (p.x > 110 && p.x < 150 && p.y > 300 && p.y < 460 && buttonEnabled)
    {
      buttonEnabled = false;

      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      dishFour(); // draw the fourth dish
    }

    if (p.x > 200 && p.x < 240 && p.y > 300 && p.y < 460 && buttonEnabled)
    {
      buttonEnabled = false;

      pinMode(XM, OUTPUT);
      pinMode(YP, OUTPUT);

      dishOne(); // draw the first dish
    }
  }
}


void ShowMenu() {
  tft.fillScreen(BLUE);

  tft.setCursor(205, 30);
  tft.setTextColor(YELLOW);
  tft.setTextSize(3);
  tft.print("MENU");

  // dishOne
  tft.fillRect(20, 80, 80, 40, MAGENTA);
  tft.drawRect(20, 80, 80, 40, BLACK);
  tft.setCursor(30, 90);
  tft.setTextColor(WHITE);
  tft.setTextSize(1);
  tft.print("ADOBO");
  tft.setCursor(30, 100);
  tft.setTextColor(WHITE);
  tft.setTextSize(1);
  tft.print("PHP 50.00");

  // dishTwo
  tft.fillRect(110, 80, 80, 40, MAGENTA);
  tft.drawRect(110, 80, 80, 40, BLACK);
  tft.setCursor(120, 90);
  tft.setTextColor(WHITE);
  tft.setTextSize(1);
  tft.print("SINIGANG");
  tft.setCursor(120, 100);
  tft.setTextColor(WHITE);
  tft.setTextSize(1);
  tft.print("PHP 45.00");

  // dishThree
  tft.fillRect(200, 80, 80, 40, MAGENTA);
  tft.drawRect(200, 80, 80, 40, BLACK);
  tft.setCursor(210, 90);
  tft.setTextColor(WHITE);
  tft.setTextSize(1);
  tft.print("TULINGAN");
  tft.setCursor(210, 100);
  tft.setTextColor(WHITE);
  tft.setTextSize(1);
  tft.print("PHP 55.00");

  // dishSeven
  tft.fillRect(20, 180, 80, 40, MAGENTA);
  tft.drawRect(20, 180, 80, 40, BLACK);
  tft.setCursor(30, 190);
  tft.setTextColor(WHITE);
  tft.setTextSize(1);
  tft.print("SIOMAI");
  tft.setCursor(30, 200);
  tft.setTextColor(WHITE);
  tft.setTextSize(1);
  tft.print("PHP 20.00");

  // dishEight
  tft.fillRect(110, 180, 80, 40, MAGENTA);
  tft.drawRect(110, 180, 80, 40, BLACK);
  tft.setCursor(120, 190);
  tft.setTextColor(WHITE);
  tft.setTextSize(1);
  tft.print("MENUDO");
  tft.setCursor(120, 200);
  tft.setTextColor(WHITE);
  tft.setTextSize(1);
  tft.print("PHP 50.00");

  // dishNine
  tft.fillRect(200, 180, 80, 40, MAGENTA);
  tft.drawRect(200, 180, 80, 40, BLACK);
  tft.setCursor(210, 190);
  tft.setTextColor(WHITE);
  tft.setTextSize(1);
  tft.print("TINOLA");
  tft.setCursor(210, 200);
  tft.setTextColor(WHITE);
  tft.setTextSize(1);
  tft.print("PHP 50.00");

  // dishFour
  tft.fillRect(20, 130, 80, 40, MAGENTA);
  tft.drawRect(20, 130, 80, 40, BLACK);
  tft.setCursor(30, 140);
  tft.setTextColor(WHITE);
  tft.setTextSize(1);
  tft.print("CHICKEN");
  tft.setCursor(30, 150);
  tft.setTextColor(WHITE);
  tft.setTextSize(1);
  tft.print("PHP 45.00");

  // dishFive
  tft.fillRect(110, 130, 80, 40, MAGENTA);
  tft.drawRect(110, 130, 80, 40, BLACK);
  tft.setCursor(120, 140);
  tft.setTextColor(WHITE);
  tft.setTextSize(1);
  tft.print("AFRITADA");
  tft.setCursor(120, 150);
  tft.setTextColor(WHITE);
  tft.setTextSize(1);
  tft.print("PHP 55.00");

  // dishSix
  tft.fillRect(200, 130, 80, 40, MAGENTA);
  tft.drawRect(200, 130, 80, 40, BLACK);
  tft.setCursor(210, 140);
  tft.setTextColor(WHITE);
  tft.setTextSize(1);
  tft.print("KARE-KARE");
  tft.setCursor(210, 150);
  tft.setTextColor(WHITE);
  tft.setTextSize(1);
  tft.print("PHP 55.00");
  //balance display
  tft.setCursor(20, 20);
  tft.setTextColor(WHITE);
  tft.setTextSize(1);
  tft.print("YOUR BALANCE: ");

  tft.setCursor(105, 20);
  tft.setTextColor(WHITE);
  tft.setTextSize(1);
  tft.print(balance);


}

void landingPage() {
  tft.fillScreen(BLUE);

  tft.setCursor(40, 50);
  tft.setTextColor(YELLOW);
  tft.setTextSize(2);
  tft.print("Your order has been");

  tft.setCursor(100, 70);
  tft.setTextColor(YELLOW);
  tft.setTextSize(2);
  tft.print("recieved.");

  tft.setCursor(20, 110);
  tft.setTextColor(WHITE);
  tft.setTextSize(2);
  tft.print("If you made a mistake,");

  tft.setCursor(50, 130);
  tft.setTextColor(WHITE);
  tft.setTextSize(2);
  tft.print("please inform us");

  tft.setCursor(80, 150);
  tft.setTextColor(WHITE);
  tft.setTextSize(2);
  tft.print("immediately.");

  tft.setCursor(60, 200);
  tft.setTextColor(YELLOW);
  tft.setTextSize(1);
  tft.print("(C) 2023 CALAMBA CITY SCIENCE");

  tft.setCursor(90, 210);
  tft.setTextColor(YELLOW);
  tft.setTextSize(1);
  tft.print("INTEGRATED SCHOOL");
  //display page 6 seconds
  delay(6000);
  //reset vars..
  balance = 10000.0;
  buttonEnabled = true;
  //show the manu
  ShowMenu();
}

void dishNine() {
  Serial.print("TINOLA  ");
  Serial.print("\t");
  delay(1000);
  Serial.println("Php 50.00"); // cost
  balance = balance - 50; //subtract the cost from the balance

  landingPage();
}

void dishSix() {
  Serial.print("KARE-KARE");
  Serial.print("\t");
  delay(1000);
  Serial.println("Php 55.00"); // cost
  balance = balance - 55; //subtract the cost from the balance

  landingPage();
}

void dishThree() {
  Serial.print("TULINGAN");
  Serial.print("\t");
  delay(1000);
  Serial.println("Php 55.00"); // cost
  balance = balance - 55; //subtract the cost from the balance

  landingPage();
}

void dishEight() {
  Serial.print("MENUDO  ");
  Serial.print("\t");
  delay(1000);
  Serial.println("Php 50.00"); // cost
  balance = balance - 50; //subtract the cost from the balance

  landingPage();
}

void dishFive() {
  Serial.print("AFRITADA");
  Serial.print("\t");
  delay(1000);
  Serial.println("Php 55.00"); // cost
  balance = balance - 55; //subtract the cost from the balance

  landingPage();
}

void dishTwo() {
  Serial.print("SINIGANG");
  Serial.print("\t");
  delay(1000);
  Serial.println("Php 45.00"); // cost
  balance = balance - 45; //subtract the cost from the balance

  landingPage();
}

void dishSeven() {
  Serial.print("SIOMAI  ");
  Serial.print("\t");
  delay(1000);
  Serial.println("Php 20.00"); // cost
  balance = balance - 20; //subtract the cost from the balance

  landingPage();
}

void dishFour() {
  Serial.print("CHICKEN  ");
  Serial.print("\t");
  delay(1000);
  Serial.println("Php 45.00"); // cost
  balance = balance - 45; //subtract the cost from the balance

  landingPage();
}

void dishOne() {
  Serial.print("ADOBO  ");
  Serial.print("\t");
  delay(1000);
  Serial.println("Php 50.00"); // cost
  balance = balance - 50; //subtract the cost from the balance

  landingPage();
}

untested, sorry.. ~q

thank you so much it's working!

void setup() {
  Serial.begin(9600);
  addFunction(2); // 2 is sent to addFunction 
}

void loop () {
}

void addFunction (int aValue) { // addFunction receives an `int`
  Serial.println(aValue + 40);
}