Graduation Project Plz Help!

So here is my code, if i try to run it on my Arduino Mega 2560 without the ESP8266WiFi.h file it works perfectly without any issues. But when I run it on the Generic ESP8266 Module i keep getting an error.

Here is my code:

#include "dht.h"
#define dht_apin A0
#include "MutichannelGasSensor.h"
#include "Metro.h" 
#include <ESP8266WiFi.h>
#include <SoftwareSerial.h>
//SoftwareSerial mySerial(0, 1); // uno sw RX(pin3) --> esp8266 TX, uno sw TX(pin2) --> esp8266 RX
//ESP8266 wifi(mySerial);
#include <Arduino.h>
#define lightSensor A1 //Analog light sensor
#define lightSwitch 22  //light Control 
#define gasH2S A2 //Output pin for H2S
#define motion 24 //motion sensor
#define motionlight 26 //motion control
#define motion2 28//motion control
#define motion2light 30//motion light



 
dht DHT;
const char* ssid = "haddad";
const char* password = "123456";
 
void setup(){
 
  Serial.begin(9600);
  delay(500);//Delay to let system boot
  WiFi.begin(ssid, password);             // Connect to the network
  Serial.print("Connecting to ");
  Serial.print(ssid); Serial.println(" ...");
  int i = 0;
  while (WiFi.status() != WL_CONNECTED) { // Wait for the Wi-Fi to connect
  delay(1000);
  Serial.print(++i); Serial.print(' ');
  }
  Serial.println('\n');
  Serial.println("Connection established!");  
  Serial.print("IP address:\t");
  Serial.println(WiFi.localIP());


  
  Serial.println("DHT11 Humidity & temperature Sensor\n\n");
  gas.begin(0x04);//the default I2C address of the slave is 0x04
  gas.powerOn();
  pinMode(lightSensor, INPUT);
  pinMode(lightSwitch, OUTPUT);
  pinMode(gasH2S, INPUT);
  pinMode(motion, INPUT);
  pinMode(motionlight, OUTPUT);
  pinMode(motion2, INPUT);
  pinMode(motion2light, OUTPUT);

  delay(1000);//Wait before accessing Sensor
 
}//end "setup()"
 
void loop(){
  //Start of Program 
 
    DHT.read11(dht_apin);
    
    Serial.print("Current humidity = ");
    Serial.print(DHT.humidity);
    Serial.print("%  ");
    Serial.print("temperature = ");
    Serial.print(DHT.temperature); 
    Serial.println("C  ");

    float co;
    float nh3;
    float ch4;
    co = gas.measure_CO();
    Serial.print("The concentration of CO is \n");
    Serial.print(co);
    Serial.println(" ppm");
    nh3 = gas.measure_NH3();
    Serial.print("The concentration of C3H8 is \n");
    Serial.print(nh3);
    Serial.println(" ppm");
    ch4 = gas.measure_CH4();
    Serial.print("The concentration of CH4 is \n");
    Serial.print(ch4);
    Serial.println(" ppm");

    int lightValue= analogRead(lightSensor);
    Serial.print("Light intensity = \n");
    Serial.print(lightValue);

    int h2s = analogRead(gasH2S);
    Serial.print("The concentration of H2S is \n");
    Serial.print(h2s);

    int  m1=digitalRead(motion);
    Serial.print("The motion sensor is \n");
    Serial.print(m1);
    if (m1==1)//motion sensor activated
    {digitalWrite(motionlight,HIGH);}
    else 
    {digitalWrite(motionlight,LOW);}

    int  m2=digitalRead(motion2);
    Serial.print("The motion sensor is \n");
    Serial.print(m2);
    if (m2==1)//motion sensor activated
    {digitalWrite(motion2light,HIGH);}
    else 
    {digitalWrite(motion2light,LOW);}

    
    delay(3000);//Wait 5 seconds before accessing sensor again.
 
 
}// end loop()

and this is the error message:

C:\Users\100553215\Documents\Arduino\temp_humiditysensor\temp_humiditysensor.ino: In function ‘void setup()’:

temp_humiditysensor:10:21: error: ‘A1’ was not declared in this scope

#define lightSensor A1 //Analog light sensor

^

C:\Users\100553215\Documents\Arduino\temp_humiditysensor\temp_humiditysensor.ino:47:11: note: in expansion of macro ‘lightSensor’

pinMode(lightSensor, INPUT);

^

temp_humiditysensor:12:16: error: ‘A2’ was not declared in this scope

#define gasH2S A2 //Output pin for H2S

^

C:\Users\100553215\Documents\Arduino\temp_humiditysensor\temp_humiditysensor.ino:49:11: note: in expansion of macro ‘gasH2S’

pinMode(gasH2S, INPUT);

^

C:\Users\100553215\Documents\Arduino\temp_humiditysensor\temp_humiditysensor.ino: In function ‘void loop()’:

temp_humiditysensor:10:21: error: ‘A1’ was not declared in this scope

#define lightSensor A1 //Analog light sensor

^

C:\Users\100553215\Documents\Arduino\temp_humiditysensor\temp_humiditysensor.ino:87:32: note: in expansion of macro ‘lightSensor’

int lightValue= analogRead(lightSensor);

^

temp_humiditysensor:12:16: error: ‘A2’ was not declared in this scope

#define gasH2S A2 //Output pin for H2S

^

C:\Users\100553215\Documents\Arduino\temp_humiditysensor\temp_humiditysensor.ino:91:26: note: in expansion of macro ‘gasH2S’

int h2s = analogRead(gasH2S);

^

exit status 1
‘A1’ was not declared in this scope

ANY FORM OF HELP IS VERY MUCH APPRECIATED!!

(deleted)

Do not cross post.

@ghaddad, stop cross-posting. Other thread removed.

@ghaddad, stop cross-posting. Other thread removed, again.

I thought that most ESP chips only had one analog input. That's why it accepts A0 but not any others.