Tag: arduino uno

如何从嵌入式C中的GSM调制解调器读取消息?

我目前正在“物联网”领域开展我的迷你项目。 我选择使用GSM模块设计无线公告板。 我将项目分为两个模块。 首先,Arduino-LED板接口完美完成。 二,GSM-Arduino接口。 基本上,消息/ SMS将从移动电话发送到GSM模块,然后我们必须使用Arduino从GSM模块读取该消息。 我在这里面临一个问题。 该消息正被发送到GSM调制解调器,但我无法读取它。 我尝试编写不同的代码,但它不起作用。 消息未显示。 这是我试过的代码片段。 `#include SoftwareSerial.h SoftwareSerial SIM900A(2,3);// RX | TX // Connect the SIM900A TX to Arduino pin 2 RX // Connect the SIM900A RX to Arduino pin 3 TX. void setup() { SIM900A.begin(9600); // Setting the baud rate of GSM Module Serial.begin(9600); // Setting the […]

如何在Arduino串口打印AT命令的响应?

我想打印AT命令的响应。 我正在发送AT命令,但我没有在Arduino串口中得到任何响应。 它给-1而不是OK。 #include “SoftwareSerial.h” String ssid = “connectify-krish”; String password = “12345678”; String myword= “”; SoftwareSerial esp(10, 11); void setup() { Serial.begin(9600); esp.begin(9600); esp.write(“AT”); Serial.println(esp.read()); } void loop() {}