This about setupEsp8266, splash, dus_out errors

I WANT TO IMPORT THE CODE TO ARDUINO BOARD BUT THEY ARE SHOWING AN ERROR PLS SOLVE THIS

#include <LiquidCrystal.h> 
#include <SoftwareSerial.h>
#include "DHT.h"

LiquidCrystal lcd(13, 12, 11, 10, 9, 8);
SoftwareSerial esp(3, 2);

//btcs
#define splash splash1

String network = "Dust";
String password = "1234567890"; 
#define IP "192.168.250.44"

String GET = "GET/update?api_key=6F2Y5EPVNZZBRYNH";

#define Gas A0 
#define DHTPIN A1 
#define dusled A3 
#define dussens A2 
#define buz 7
#define DHTTYPE DHT11 
int a, b;

DHT dht(DHTPIN, DHTTYPE);

int DispDelay; 
int gas_r, hum; 
float dus_out; 
float temp;

int tu = 35; 
String out; 

void setup()
{
        // setup code, to run once:
    Serial.begin(115200); 
    dht.begin(); 
    pinMode(Gas, INPUT);
    pinMode(buz, OUTPUT);
    digitalWrite(buz, LOW); 
    esp.begin(115200);            

    LcDSet();
    setupEsp8266();
    lcd.clear();

}

void LcDSet() 
{
     lcd.begin(16, 2);
     // Print a message to the LCD. lcd.clear();
    splash(0, "Air Pollution"); splash(1, "Monitoring"); delay(1000);
}


void loop() 
{
    tu++; setDisp();
    float h = dht.readHumidity();
    // Read temperature as Celsius (the default) float t = dht.readTemperature();
    gas_r = analogRead(Gas); 
    dus_out = dust(dusled, dussens);
    temp = t;
    hum = h;
    if (gas_r > 550) 
    { 
        digitalWrite(buz, HIGH); 
        delay(100); 
        digitalWrite(buz, LOW);
        delay(25); 
        digitalWrite(buz, HIGH); 
        delay(100);
        digitalWrite(buz, LOW); 
        delay(25); 
        digitalWrite(buz, HIGH);
    }
    else 
    {
        digitalWrite(buz, LOW);
    }

    Serial.println(dus_out); delay(300);

    if (tu >= 60) 
    {
            send2();
        tu = 0;
    }
 
}

void setDisp() {

    if (DispDelay >= 0 and DispDelay < 20) 
    {
         display_T(temp, hum);
    }
    else if (DispDelay >= 20 and DispDelay < 40) 
    {
        display_ard(gas_r, dus_out);
    }
    else 
    {
         DispDelay = 0;
    }
    DispDelay++;
}

void send2() 
{
    splash(0, "Please Wait"); splash(1, "Sending Data");
    updateServer(String(temp), String(hum), String(gas_r), String(dus_out));
    delay(3000); lcd.clear();
}

void display_ard(int val1 , float val2) 
{
    lcd.setCursor(0, 0); lcd.print("G:	"); lcd.setCursor(3, 0); lcd.print(val1); lcd.setCursor(0, 1); lcd.print("D:	"); lcd.setCursor(3, 1); lcd.print(val2); lcd.print(" mg/m3 ");

}


void display_T(float val1 , int val2)
 {
    lcd.setCursor(0, 0); lcd.print("T:	"); lcd.setCursor(3, 0); lcd.print(val1);
 
    lcd.print(char(223)); lcd.print(" C "); lcd.setCursor(0, 1); lcd.print("H:	"); lcd.setCursor(3, 1); lcd.print(val2);   
    lcd.print(" % ");
}

AND MY OUTPUTS ARE SHOWING LIKE THIS

C:\Users\W3sle\Desktop\final\final.ino: In function 'void setup()':
C:\Users\W3sle\Desktop\final\final.ino:46:5: error: 'setupEsp8266' was not declared in this scope
     setupEsp8266();
     ^~~~~~~~~~~~
C:\Users\W3sle\Desktop\final\final.ino: In function 'void LcDSet()':
C:\Users\W3sle\Desktop\final\final.ino:9:16: error: 'splash1' was not declared in this scope
 #define splash splash1
                ^
C:\Users\W3sle\Desktop\final\final.ino:55:5: note: in expansion of macro 'splash'
     splash(0, "Air Pollution"); splash(1, "Monitoring"); delay(1000);
     ^~~~~~
C:\Users\W3sle\Desktop\final\final.ino:9:16: note: suggested alternative: 'splash'
 #define splash splash1
                ^
C:\Users\W3sle\Desktop\final\final.ino:55:5: note: in expansion of macro 'splash'
     splash(0, "Air Pollution"); splash(1, "Monitoring"); delay(1000);
     ^~~~~~
C:\Users\W3sle\Desktop\final\final.ino: In function 'void loop()':
C:\Users\W3sle\Desktop\final\final.ino:65:15: error: 'dust' was not declared in this scope
     dus_out = dust(dusled, dussens);
               ^~~~
C:\Users\W3sle\Desktop\final\final.ino:65:15: note: suggested alternative: 'out'
     dus_out = dust(dusled, dussens);
               ^~~~
               out
C:\Users\W3sle\Desktop\final\final.ino:66:12: error: 't' was not declared in this scope
     temp = t;
            ^
C:\Users\W3sle\Desktop\final\final.ino: In function 'void send2()':
C:\Users\W3sle\Desktop\final\final.ino:9:16: error: 'splash1' was not declared in this scope
 #define splash splash1
                ^
C:\Users\W3sle\Desktop\final\final.ino:114:5: note: in expansion of macro 'splash'
     splash(0, "Please Wait"); splash(1, "Sending Data");
     ^~~~~~
C:\Users\W3sle\Desktop\final\final.ino:9:16: note: suggested alternative: 'splash'
 #define splash splash1
                ^
C:\Users\W3sle\Desktop\final\final.ino:114:5: note: in expansion of macro 'splash'
     splash(0, "Please Wait"); splash(1, "Sending Data");
     ^~~~~~
C:\Users\W3sle\Desktop\final\final.ino:115:5: error: 'updateServer' was not declared in this scope
     updateServer(String(temp), String(hum), String(gas_r), String(dus_out));
     ^~~~~~~~~~~~

exit status 1

Compilation error: 'setupEsp8266' was not declared in this scope

You've probably failed to copy an #include statement in to your code from the tutorial or other source.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.