// #include <HardwareSerial.h>
void setup()
{
Serial.begin(115200);
delay(500);
// Serial.begin(115200, SERIAL_8N1, 18, 17);
delay(500);
Serial.println("ATI");
delay(100);
update_serial();
Serial.println("AT+CSQ");
delay(100); update_serial();
Serial.println("AT+CIMI");
delay(100); update_serial();
pinMode(2,OUTPUT);digitalWrite(2,HIGH);
sent_sms();
}
void loop()
{
if (Serial.available())
{ char c = Serial.read();
Serial.write(c);
}
update_serial(); }
void update_serial()
{
if (Serial.available())
{ Serial.write(Serial.read());
}
}
void sent_sms()
{ Serial.println("AT+CMGF=1");
delay(500);
Serial.println("AT+CMGS=\"+40730002825\"");
delay(500);
Serial.print("test sent sms SIM7600");
delay(500);
Serial.write(26);
delay(500);
}