void setup() {
// Start communication with the GSM module
Serial.begin(9600);
delay(1000);
}
void loop() {
// Configure GSM module
Serial.println("AT"); // Test the communication
delay(1000);
Serial.println("AT+CMGF=1"); // Set SMS mode to text
delay(1000);
Serial.println("AT+CMGS=\"+1234567890\""); // Replace with the target phone number
delay(1000);
Serial.print(" "); // Message content
delay(1000);
Serial.write((char)26); // ASCII code for CTRL+Z to send the SMS
}