使用Arduino发送短信

时间:2019-03-05 11:48:47

标签: c arduino gsm

我目前正在从事一个项目。我尝试使用其他示例测试代码将短信发送到当前号码,但不会发送任何短信。

  1. 我的SIM 800L GSM模块sim卡和电话号码应具有相同的运营商吗?
  2. 在使用3.7v电源时,我甚至遵循了别人的建议。
  3. 图书馆已经包括在内。
  4. 正确的RX-TX TX-RX,VCC,RST引脚。

下面是我一直关注的示例代码。

#include <Sim800l.h>
#include <SoftwareSerial.h> //is necesary for the library!! 
Sim800l Sim800l;  //to declare the library
char* text;
char* number;
bool error; //to catch the response of sendSms


void setup(){
  Sim800l.begin(); // initializate the library. 
  text="Testing Sms";  //text for the message. 
  number="2926451386"; //change to a valid number.
  error=Sim800l.sendSms(number,text);
  // OR 
  //Sim800l.sendSms("+540111111111","the text go here")


}

void loop(){
  //do nothing
}

这应该是向电话号码发送短信,但我没有收到任何短信。

0 个答案:

没有答案
相关问题