https://item.taobao.com/item.htm?spm=a1z09.2.0.0.5fc02e8dncAF2p&id=604968021102&_u=i1qf7bf5f4ec





請注意
后面是 回車 結束
void sendMeg()
{
Serial.println("AT");
delay(2000);
Serial.println("AT+CMGF=1");
delay(2000);
Serial.println("AT+CMGS=\"PHONENUMBER\"");//這里改成你的號碼
delay(2000);
Serial.print("Test\r\n");//這里寫內容
delay(2000);
Serial.write(0x1A); //原來這里我是“Serial.print(0x1A);”,一直調不出來,后來改了才成功了,那酸爽
}
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
delay(15*1000);
sendMeg();
}
