arduino控制SIM900A模塊


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();
}

  


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM