#include <ESP32Servo.h>
#include <WiFi.h>
#define GAS_SENSOR_PIN 34
#define BUZZER_PIN 25
#define SERVO_PIN 18
Servo myservo;
const int gasThreshold = 400;
char* ssid = "Galaxy S10e461";
char* password = "tnjm6483";
void setupWiFi();
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
setupWiFi();
}
void loop() {
// put your main code here, to run repeatedly:
delay(10); // this speeds up the simulation
}
void setupWiFi() {
Serial.println("Connecting to Wi-Fi...");
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("\nConnected to Wi-Fi!");
Serial.println("IP Address: " + WiFi.localIP().toString());
}