SIM7000 NB-IoT LTE GPRS 串口无法输入AT指令
运行程序后,串口接受信息但无法发送AT指令。是操作有问题吗#include <DFRobot_SIM7000.h>
#define PIN_TX 7
#define PIN_RX 8
SoftwareSerial mySerial(PIN_RX,PIN_TX);
DFRobot_SIM7000 sim7000(&mySerial);
void setup() {
Serial.begin(115200);
mySerial.begin(19200);
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);
}
没有外部供电,用电脑USB直接供电 uno和扩展板都要供电。通过扩展板vin和GND两个引脚外部供电7~12VDC,net指示灯亮起表示扩展板工作
wiki正在更新中,可以先用库里的例程
我加了外部电源10v的,net灯也亮了,但还是不好用呀
页:
[1]