Could you tell me what's wrong with this code? It won't send a message to the user at all.
#include <SoftwareSerial.h> #include <LiquidCrystal.h> SoftwareSerial mySerial(11, 10); LiquidCrystal lcd(7, 6, 5, 4, 3, 2); int gasPin = A0; int buzzerPin = 12; int data = 120; int greenLedPin = 8; int redLedPin = 9; void setup() { Serial.begin(9600); mySerial.begin(9600); mySerial.println("AT+CMGF=1"); delay(1000); mySerial.println("AT+CSCA=\"+639532248926\""); delay(1000); lcd.begin(16, 2); pinMode(gasPin, INPUT); pinMode(buzzerPin, OUTPUT); pinMode(greenLedPin, OUTPUT); pinMode(redLedPin, OUTPUT); lcd.begin(16, 2); lcd.clear(); lcd.setCursor(1, 0); lcd.print("GAS DETECTION"); lcd.setCursor(0, 1); lcd.print("SYSTEM"); delay(1000); lcd.clear(); } void loop() { int gasValue = analogRead(gasPin); Serial.print("Gas Value: "); Serial.println(gasValue); lcd.setCursor(0, 0); lcd.print("Gas Value: "); lcd.setCursor(12, 0); lcd.print(gasValue); delay(1000); if (gasValue > data) { lcd.clear(); lcd.setCursor(0, 0); lcd.print("GAS LEAKAGE");