新买的模块SIM7000 Arduino NB-IoT LTE GPRS 扩展板 程序出现在这....
#include <DFRobot_SIM7000.h>#define PIN_TX 7
#define PIN_RX 8
SoftwareSerial mySerial(PIN_RX,PIN_TX);
DFRobot_SIM7000 sim7000;
void setup() {
Serial.begin(115200);
sim7000.begin(mySerial);
sim7000.turnOFF();
delay(5000);
Serial.println("Turn ON SIM7000......");
if(sim7000.turnON()){ //Turn ON SIM7000
Serial.println("Turn ON !");
}
Serial.println("Set baud rate......");
if(sim7000.setBaudRate(19200)){ //Set baud rate from 115200 to 19200
Serial.println("Set baud rate:19200");
}else{
Serial.println("Faile to set baud rate");
while(1);
}
mySerial.begin(19200);
Serial.println("For example, if you type AT\\r\\n, OK\\r\\n will be responsed!");
Serial.println("Enter your AT command :");
}
void loop() {
mySerial.listen();
while(mySerial.available()){
Serial.write(mySerial.read());
}
mySerial.flush();
while(Serial.available()){
mySerial.write(Serial.read());
}
delay(20);
}
有大佬知道吗 新买的按示例步骤试试 shzrzxlee 发表于 2022-2-6 11:17
新买的按示例步骤试试
这个例程就是资料库里面的 需要加载 库。
页:
[1]