HM-10 and Arduino - Sending AT commands with no line ending from code

I need to use HM-10 with Arduino Uno or Nano. I'm not able to figure out how to send AT commands and read the reply. The commands work from serial monitor, but not from code.

Here's what I've tried so far:

#include <SoftwareSerial.h>

SoftwareSerial blueToothSerial(0,1); // RX, TX

void setup()
  // Open serial communications and wait for port to open:
  Serial.println("Serial began");

void loop()
  if (blueToothSerial.available())
    Serial.println("bluetooth serial available");

However, I'm not able to read any reply, I feel the command is not firing. The execution doesnt go inside if(blueToothSerial.available())


You need to learn the difference between an AT command and an AT command line. Reading all of chapter 5 in the V.250 specification is the perfect starting point since it will teach you almost everything you need to know about basic AT command handling. And even after becoming an expert you will read this document.

The modem will not start processing AT commands until it has received a complete command line, so you should fix that. But you also need to rework the logic significantly to read and parse the response sent back from the modem. This is described in the answer linked above.

Update: It seems that the HM-10 manufacturer should learn the difference between an AT command and an AT command line, because HM-10 does not behave as a modem at all. Its documentation says

AT Command format: Uppercase AT command format. string format, without any other symbol. (e.g. \r or \n)

The command handling of HM-10 is wrong on so many levels. If the manufacturer want to invent their own text protocol for communicating with device, by all means they are free to do so. But then they should not call it AT commands when it is not that it is. This is like going to a dance class where the teacher claims that he or she is teaching you salsa but in reallity is just teaching something arbitrary he/she invented on their own, just being inspired by watching someone else dance salsa once...

First of all, HM-10 developers have either a complete lack of understanding of what an AT command line is, or they wilfully chose to ignore that and implement something completely different while still calling it AT commands. I do not know which is worst. A modem accepts AT command through a command line which might contain several commands, e.g. "ATI\r" is a command line sending one I command while "ATI I I\r" is a command line sending three I commands. HM-10 apparently only accepts a command just by itself.

Secondly, the syntax for the parameters are completely mixed up by using Extended syntax command names but using Basic syntax command parameters. Basic syntax commands are single character and have the numeric value following immediately, e.g. ATM1 while extended syntax command have parameters starting with an equal sign, e.g. AT+IPR=9600. HM-10 is using some weird extended/basic hybrid syntax like AT+BAUD[para1]. Again I am not sure if this is due to ignorance or indifference.

Thirdly the order of the result code and information is reversed and mixed. A normal AT command will print information text before printing the final result code, e.g.


HM-10 both reverses the order and combine them into one thing like OK+Set:[para1]. This I think most likely can be explained by indifference to how a modem actually operates.

Forth, the naming of the commands seems to just start with "AT+" and then append whatever name for the command, without using any proper prefix as written in chapter "5.4.1 Command naming rules" and "Appendix I" in V.250. I guess this is due to ignorance.

Fifth, the names of what corresponds to Unsolicited result codes have the exact syntax as the command result codes (e.g. OK+CONN, OK+LOST versus OK+WORK, OK+Get:[para1]) making responses from HM-10 impossible to parse generically. And when new commands with new responses are added to HM-10 this might break existing software. This is horribly bad protocol design.

Sixth, HM-10 amazingly seems to have no concept of returning an error indication when commands fail. The NAME command have 12 character limit, so what will issuing AT+NAMEthis_name_is_longer_than_12_characters return? I do not know but I will guess either OK+SetName:previousname or OK+SetName:this_name_is, but who knows - it seems that you have to resort to trial and error to find out. Trying to parse the success of commands executed from this would be a nightmare. This again is horribly bad protocol design.

Seventh, some commands (e.g. AT+RSSI?) have the question mark embedded in the name instead of letting the question mark indicate parameter read command syntax like modems do.

Other syntax flaws include allowing single characters as parameter values. AT command have just two types of parameters, numeric values and strings, and strings always start and end with double quote characters. And at this point I do not bother trying to find more flaws.

I absolutely do get that this is an embedded device where implementing something that supports a full modem syntax might be too much and something simpler is needed. That is perfectly fine, but then you should not claim that this is AT commands.

HM-10 seems like the bad salsa teacher you should avoid contact with and stay away from as far as possible. Maybe if you only ever would dance with other persons from that class you could stay ignorant happy imagining that you danced salsa, but you would fail whenever tried to dance with other people.

Maybe the actual HM-10 hardware is good, I do not know. But the command protocol have severe problems in addition to the fact that this is not AT commands at all. I recommend looking for alternatives.

受限制的 HTML

  • 允许的HTML标签:<a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • 自动断行和分段。
  • 网页和电子邮件地址自动转换为链接。

  • HM10 ble 改变特征值 AT 命令 Arduino(HM10 ble change characteristic value AT command Arduino)
    问题 任何人都可以帮助我使用 AT 命令来写入特征值,或者如何使用 Hm10 模块将数据从 arduino 发送到另一个 ble 设备。 HM10发送AT+START后,会做广告包,可以检测服务和特征,但是特征值是默认的0x00,怎么改? 已多次检查数据表,但找不到能够执行相同操作的 AT 命令。 更新:在中央模式下设置 HM10 的类似问题: 中央模式设置! 1) AT+ROLE1 - 设置为中央模式 2) AT+IMME1 - 从 RESET 开始 3) AT+SHOW1 - 显示发现的设备 4)AT+光盘? - 发现设备获取设备 MAC ID, 5) AT+CON[MAC ID] 结果:总是给出 OK+CONNA 并在 10 秒后给出 OK+CONNF 我很困惑,在“AT+DISC”之前使用“AT+START”? 导致 AT+START 不起作用,反之亦然。 使用 AT+START 会导致 OK+CONN 循环,然后是 OK+LOST,并且不再接受更多的 AT 命令。 我相信它会导致 你能建议正确的顺序吗? 使用 LightBlue iOS 应用程序作为外围设备。 如何选择服务并订阅特征以从应用程序接收数据? 谢谢你。 回答1 没有设置特征值的 AT 命令。 HM10 是一个串行端口仿真设备 - 您发送到 HM10 模块的任何串行数据(除了 AT 命令)都可以通过它的 BLE
  • HM10 ble change characteristic value AT command Arduino
    Can anyone help me with the AT command to write characteristic value, Or how to send data from arduino to another ble device using Hm10 module. The HM10 after sending the AT+START, does advertise packets, and can detect the service and characteristic, But the characteristic value is the default 0x00, How can I change that? Have checked the data sheet multiple times but can not find an AT command that is capable of doing the same. UPDATE: Similar problem with setting the HM10 in Central Mode: Central Mode Setup! 1) AT+ROLE1 - Set up to Central Mode 2) AT+IMME1 - Start from RESET 3) AT+SHOW1 -
  • 如何使用基于HM-10蓝牙模块的BLE Shield?(How to use BLE Shield based on HM-10 bluetooth module?)
    问题 我是arduino项目的新手。 我想请你帮忙。 我从 ( http://imall.iteadstudio.com/development-platform/arduino/shields/im130704001.html ) 为 Arduino 购买了 BLE Shield。 他们使用Hm-10蓝牙模块(http://www.jnhuamao.cn/bluetooth.asp?ID=1)制作了这个盾牌。 Itead Studio 没有使用此屏蔽的示例代码。 我不知道如何编程或从 Arduino 发送 AT 命令。 我阅读了数据表(ftp://imall.iteadstudio.com/Shield/IM130704001_ITEAD_BLE_Shield/DS_IM130704001_ITEAD_BLE_Shield.pdf)中的“AT命令”,并尝试使用此代码(http: //arduino.cc/en/Reference/SoftwareSerial )但我只收到了命令。 这里有人用过这个 HM-10 蓝牙模块吗? 我需要一些 arduino 草图来寻求帮助! 回答1 #include <SoftwareSerial.h> int led = 13; int bluetoothTx = 2; int bluetoothRx = 3; SoftwareSerial
  • How to use BLE Shield based on HM-10 bluetooth module?
    I'm a new bie on arduino projects. I would like to ask you for some help. I bought a BLE Shield for Arduino from ( http://imall.iteadstudio.com/development-platform/arduino/shields/im130704001.html ). They made this shield using Hm-10 Bluetooth module(http://www.jnhuamao.cn/bluetooth.asp?ID=1). Itead Studio has no sample codes using this shield. I have no idea on how to program it or send AT commands from Arduino. I read the “AT commands” at the data sheet (ftp://imall.iteadstudio.com/Shield/IM130704001_ITEAD_BLE_Shield/DS_IM130704001_ITEAD_BLE_Shield.pdf) and I tried to send "AT commands”
  • 我可以使用 Arduino 读取 iBeacon 数据吗?(Can I read iBeacon data using Arduino?)
  • HM10 与 Arduino 和 Android BLE 之间的低功耗蓝牙大数据传输(Large data transmission in Bluetooth Low Energy between HM10 with Arduino & Android BLE)
    问题 在我的 android 应用程序中从 HM-10 低功耗蓝牙接收数据时遇到问题我做了一半。 我所做的是:将数据从手机发送到 BLE,现在我成功了,我想从 BLE 接收数据到我的手机。 (Arduino) --> (HM-10 BLE) ->-->-BLE CONNECTION-->-->- (ANDROID APP) 所以我从 Arduino 发送虚拟数据,但我无法在应用程序中接收它。 这是负责将数据从 Android 发送到 BLE 模块的类 public class DeviceControlActivity extends Activity { private final static String TAG = DeviceControlActivity.class.getSimpleName(); public static final String DEVICE1_ON = "0"; public static final String DEVICE1_OFF = "1"; public static final String DEVICE2_ON = "2"; public static final String DEVICE2_OFF = "3"; public static final String EXTRAS_DEVICE_NAME = "DEVICE
  • Large data transmission in Bluetooth Low Energy between HM10 with Arduino & Android BLE
    Have an issue receiving data from HM-10 Bluetooth Low Energy in my android App I did half the way. what I did is : sending data from the phone to the BLE and i succeeded now i want to receive data to my phone from the BLE. (Arduino) --> (HM-10 BLE) ->-->-BLE CONNECTION-->-->- (ANDROID APP) So I'm sending dummy data from Arduino but I cannot receive it in the app. here's the class that responsible to send data from Android to the BLE Module public class DeviceControlActivity extends Activity { private final static String TAG = DeviceControlActivity.class.getSimpleName(); public static final
  • Arduino Sim900 没有回声但发送了短信(Arduino Sim900 with no echo but SMS was sent out)
    问题 我刚买了一个新的 Sim900 并连接到了 Arduino Uno。 我使用下面的代码向自己发送文本。 我在我的手机上收到了文本,但我的串行监视器上没有收到任何回声(即“OK”)。 我曾尝试交换 RX/TX 引脚和不同的波特率,但没有成功。 void setup() { Serial.begin(9600); //Baud rate of the GSM/GPRS Module Serial.println(""); delay(2000); Serial.println("AT+CMGF=1"); delay(1000); Serial.println("AT+CMGS=\"+120########\""); //Number to which you want to send the sms delay(1000); Serial.print("This is a test."); //The text of the message to be sent delay(1000); Serial.write(0x1A); // send CTRL - z to end message Serial.write(0x0D); // Carriage Return Serial.write(0x0A); // Line Feed delay(5000); } void loop
  • How do I pair and/or bond to BLE on iOS using Swift code and an HM-10 so data sent is encrypted?
    Background I've built a simple circuit which includes an Arduino Nano and a HM-10 BLE serial module. You can see that circuit at the following Electrical Engineering SE question: https://electronics.stackexchange.com/questions/412525/when-i-write-data-to-a-ble-characteristic-ffe1-to-send-data-over-bluetooth-is I also have an Xcode project written in Swift that successfully sends bytes to the FFE1 characteristic. It all works great and I can see the data coming from my iPad via Arduino Serial monitor. However, from the research I did (see previous link) I believe I've determined that the data I
  • 如何在Arduino串口中打印对AT命令的响应?(How to print response to AT commands in Arduino serial port?)
    问题 我想打印对 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() {} 回答1 正如评论中已经指出的那样,您不会终止 AT 命令行,因此调制解调器永远不会对此做出响应。 请务必阅读 V.250 并了解 AT 命令和 AT 命令行之间的区别。 ATI是一个AT命令, "ATI II\r"是一个连续调用这个命令3次的命令行。 请注意,在此示例中,您将仅获得所有三个的单个最终结果代码,即最终结果代码是对完整命令行的响应,而不是对单个命令调用的响应。 然后在修复命令的发送后,您必须正确处理响应。 这包括读取和解析调制解调器作为对发送的命令行的响应而发回的内容。 有关代码结构和实现提示,请参阅此答案。 回答2 正如你被告知的
  • 如何让 Qt 中的程序不断向我的 Arduino 发送字符串?(How Do I Make My Program in Qt Continually Send A String to My Arduino?)
    问题 当我按住一个按钮时,我无法让我的程序连续发送字符串"move 200" 。 我将按钮设置为自动重复,但是它只在按钮被释放时发送,而不是在按住时发送。 然而,当被按住时,计数器正在添加消息应该发送的次数。 我不知所措。 主窗口.cpp void MainWindow::on_forwardButton_clicked() { if(arduino->isWritable()){ arduino->write(command.toStdString().c_str()); qDebug() << i; }else{ qDebug() << "Couldn't write to serial!"; } ui->label->setText("Moving"); i++; } 主窗口.h ifndef MAINWINDOW_H define MAINWINDOW_H include <QMainWindow> include <QDialog> include <QSerialPort> namespace Ui { class MainWindow; } class MainWindow : public QMainWindow { Q_OBJECT public: explicit MainWindow(QWidget *parent = 0); ~MainWindow()
  • 如何使用 GSM 模块 SIM800 和 Arduino Uno 发送短信?(How to send SMS with GSM module SIM800 and Arduino Uno?)
    问题 我正在尝试通过 SIM800 GSM 模块从 Arduino 发送短信。 消息到达给定的号码,但格式不正确。 它显示“不支持消息格式”。 我在这里包括我的代码,非常感谢快速回复。 #include <SoftwareSerial.h> SoftwareSerial GPRS(11, 12); //11 = TX, 12 = RX unsigned char buffer[64]; //port int count=0; int i = 0; //if i = 0, send SMS. void setup() { GPRS.begin(9600); // the GPRS baud rate Serial.begin(9600); // the Serial port of Arduino baud rate. Serial.print("I'm ready"); Serial.print("Hello?"); } void loop() { if (GPRS.available()) { // if date is coming from softwareserial port ==> data is coming from GPRS shield while(GPRS.available()) { // reading data into char array
  • SIM900 AT 命令响应解析(SIM900 AT Commands response parsing)
    问题 我正在使用连接到 Arduino Uno 的 sim900 gps/gprs 模块屏蔽,我将如何解析我的 AT 命令的响应? 或者如何在发送 AT 命令后删除串行中打印的第一行? AT+CMGL="ALL" +CMGL: 1,"REC READ","+XXXXXXXXXX","","16/04/25,15:20:59+32" Hilp akp si ralphh the pogi one mmalit mi pizza hehehehehe +CMGL: 2,"REC READ","+XXXXXXXXXX","","16/04/25,21:51:33+32" Yow!!! OK 上面输出的例子,我想去掉 AT+CMGL="ALL" 然后解析剩下的数据,解析的最好方法是什么 回答1 我将如何解析我的 AT 命令的响应? 是的,这是一个正确的问题。 发送 AT 命令后,如何删除串行中打印的第一行? 不,这是一个错误的问题,因为如果您关心回声是否打开,那么您就做错了。 解析AT命令输出的正确策略如下: 发送 AT 命令行(以"\r"正确终止)。 读取从调制解调器接收的一个又一个字符,直到您有一整行以"\r\n"结尾,然后解析该行。 如果该行等于最终结果代码,则命令行的所有输出都已完成(并且调制解调器已准备好接收新命令)。 这一定是你测试的第一件事! 如果正在运行的 AT
  • Bash、串行 I/O 和 Arduino(Bash, serial I/O and Arduino)
    问题 所以,我有点不知所措,我觉得我已经非常接近解决方案了,但它还没有完全奏效。 这是我的情况: 我正在使用 Arduino 微控制器,我正在尝试编写两个 Bash 脚本(现在在 Mac OS X 10.6 中运行),它们将 (a) 将来自 Arduino 单元的所有串行数据打印到标准输出,并且(b) 允许我向 Arduino 单元发送串行数据。 然后将使用 Adob​​e AIR 的 NativeProcess API 调用这些脚本,以实现 Arduino 单元和 Flex Adob​​e AIR 应用程序之间的紧密集成。 我的两个脚本非常简单—— 这是我的 WriteToSerial.sh 脚本: echo $1 > $2 ($1 显然是我的字符串,$2 是串口的位置——目前是 /dev/tty.usbserial-A800eIUj) 这是我的 ReadSerialOutput.sh 脚本: tail -f $1 ($1 是我的串口位置,目前是/dev/tty.usbserial-A800eIUj) 当我调用这些脚本中的任何一个时(或者即使我只是直接在 Bash 控制台中输入命令),我的计算机就会挂起 - 我可以输入字符,但是在我Ctrl + C退出该过程之前什么也没有发生。 但是,如果我打开 Arduino IDE 并打开串行监视器,然后tail -f端口,关闭串行监视器
  • AT命令响应(了解Arduino上代码执行的顺序)(AT command responses (understanding order of code execution on Arduino))
    问题 我正在从Arduino Uno / Nano(ATmega328)向ESP8266发送AT命令,并尝试解析接收到的字符串的结尾以响应,以建立ESP的反应方式以及它是否成功(以及是否准备好接收另一个命令)然而)。 我知道在这里之前已经讨论了解析AT命令响应: 获取AT命令响应 但是我有一个没有解决的特定问题,这里的其他人也可能会感兴趣... 首先,调用一个函数,该函数将AT命令发送到ESP以连接到ThingSpeak(数据记录服务器)。 这在手动模式下可以正常工作,并且在尝试解析响应时也可以连接,但是它仅解析返回的第一行。 例如,串行监视器中的预期输出为: c AT+CIPSTART="TCP","api.thingspeak.com",80 CONNECT OK Connected to ThingSpeak! 其中c只是我键入的命令字符以启动连接。 但是,实际响应如下: c AT+CIPSTART="TCP","api.thingspeak.com",80 Cannot connect to ThingSpeak! CONNECT OK 这意味着解析函数在收到响应之前就结束了...如下代码所示,当前指定了10秒的超时时间。 即使超时20秒,也会发生相同的事情,尽管实际上在手动执行时,响应会在大约一秒钟后到达。 仅为了测试解析功能,我尝试搜索"80" ,它返回true
  • ESP8266+at指令集 学习笔记
    说明: 1.下面所有的命令,不做特殊说明,命令结尾处都要加/r/n装换成ASCII就是0x0d,0x0a。在编程中,这个很重要。我们的这个文档主要针对的也是编程过程。 2.AT命令,编程实现和用串口调试有很大的区别,主要体现在时间的延时上,在编程中,很多AT命令都需要相对应的延时,有些命令的延时需要长一些,而有一些则需要尽量的短,而这时间和实际环境也相关。所以,编程实现ESP8266的功能需要大量的时间来调试。 3.每个人用的模块的硬件电路可能有差异,所以如果对硬件不熟悉,就不能完全照抄别人的代码。当然,本质都是一样的,我们也得学习学习别人写好的那些调试代码,看他们的思路与设计过程,集众家之所长。 4.对于ESP8266的AT命令函数,网上能找到很多写好的库的函数,下载下来直接用就可以,都是开源的代码,结合自己的需求进行修改。注意,这个AT的库函数并不是官方的,官方是没有的,这个是别人写的,所以可能带有一些错误,但基本都是正确的,如果不确定,就先不用库函数,而是自己写简单的发送代码。 5.初次调试时,需要单步调试,观察每一步得到的返回字符,看是否正确。 6.文档涉及的命令很少,ESP8266本身AT命令也不多,主要用的是STA模式和AP模式,最后的目的便是网关(也就是ESP8266模块)和服务器的通信,通信才是重点,当然,肯定是不会直接通信的,必须依靠网络发送协议,也就是MQTT了
  • python至arduino串行读写(python to arduino serial read & write)
    问题 我正在尝试在一些python代码和arduino代码之间来回“乒乓”信息。 我想定期将两个设定值发送到arduino代码(例如在分钟上),在arduino上读取它们并更新变量,然后定期将arduino的状态信息发送回python(例如:30秒)。 最终,python将从mySQL数据库发送信息并从中提取信息(后来的开发人员)。 现在,我无法获得可靠往返的信息。 我没有在搜索中找到与此相近的任何内容,而且我尝试修改的所有内容均无效。 我最近的是这个(它实际上并没有在发送和接收之间来回切换): Python #!/usr/bin/python import serial import syslog import time #The following line is for serial over GPIO port = '/dev/ttyS0' ard = serial.Serial(port,9600,timeout=5) i = 0 while (i < 4): # Serial write section setTempCar1 = 63 setTempCar2 = 37 ard.flush() setTemp1 = str(setTempCar1) setTemp2 = str(setTempCar2) print ("Python value sent: ")
  • 当我按下 Enter 键时 PuTTY 会发送什么?(What does PuTTY send when I press Enter key?)
    问题 我正在拼命尝试让蓝牙加密狗与我的 Arduino 一起使用,但我无法向它发送它需要的命令。 当我通过 USB 到 UART 芯片将它插入我的计算机并从 PuTTY 发送命令 ( C ) 然后按Enter时,我可以使用它。 蓝牙加密狗的命令表说我试图发送它的命令C<cr>但我不知道如何从 Arduino 代码发送正确的回车符。 我曾尝试使用Serial.println()函数以及将\r字符添加到我当前的Serial.write("C\r")但这些都不起作用。 我怎样才能做到这一点? 回答1 有趣的是,我可以在 Win 7: PuTTY 上为我报告相反的情况,我的嵌入式项目仅通过 COM 端口发送\r 。 好奇,阅读:令人沮丧的无法解释,但我只是在串行连接的另一端寻找任何一个字符。 然后,如果您在终端选项下启用“每个 CR 中的隐式 LF”,它将同时发送\r\n 。 默认行为似乎类似于 Commodore 机器 :D (http://en.wikipedia.org/wiki/Newline)。 谁知道... 回答2 PuTTY 模拟模拟 vt100 的 xterm。 要在按下回车键时让 putty 发送 CR/LF,请在连接到串行设备后在 putty 中键入 ESC[20h。 这将 VT100 LNM 设置为真。 http://vt100.net/docs/vt100-ug
  • Arduino在GSM sim900错误中发送短信(Arduino sending sms in GSM sim900 error)
    问题 我有一个 Arduino Mega 2560 和一个 sim900 gsm 模块。 我成功地连接了它们并编写了代码。 它可以工作,但我只能在 while 循环中一次发送 1 条短信。 这意味着当我编写一个 while 循环来使用 while 循环执行 sendms() 5 次时。 只发送了一条短信……然后就停止了…… 代码如下: #include <SoftwareSerial.h> #include <String.h> SoftwareSerial mySerial(52, 53); void setup() { mySerial.begin(19200); // the GPRS baud rate Serial.begin(19200); // the GPRS baud rate delay(500); } int x = 0; loop() { while (x<5) { SendTextMessage(); x++; } } void SendTextMessage() { mySerial.print("AT+CMGF=1\r"); delay(100); mySerial.println("AT + CMGS = \"+94776511996\""); delay(100); mySerial.println("hey wow"); delay(100)
  • arduino+ESP8266模块使用AT指令设置wifi
    原文链接:https://dsx2016.com/?p=1510 公众号:大师兄2016 前言 本文使用ESP8266模块结合arduino设置wifi通信 设备 ESP8066-01模块 ESP8266 是一款超低功耗的 UART-WiFi 透传模块,拥有业内极富竞争力的封装尺寸和超低能耗 技术,专为移动设备和物联网应用设计,可将用户的物理设备连接到 Wi-Fi 无线网络上,进行互联网 或局域网通信,实现联网功能。 ESP8266 封装方式多样,天线可支持板载 PCB 天线,IPEX 接口和邮票孔接口三种形式; ESP8266 可广泛应用于智能电网、智能交通、智能家具、手持设备、工业控制等领域 电路图 注意引脚的位置,不要把线路设置反了 参考1 参考2 arduino接线 使用esp8266只要5个针脚就可以了,分别是 GND、VCC、TX、RX、CH_PD 特别注意,电源接的是 3.3V;否则会烧坏WiFi 模块! 特别注意,电源接的是 3.3V;否则会烧坏WiFi 模块! 特别注意,电源接的是 3.3V;否则会烧坏WiFi 模块! 如下图所示 其中CH_PD和VCC这两根红线都是接3.3v电源,具体方法看下文arduino实物图 参数说明 Arduino UNO R3 板ESP8266 WiFi 模块GNDGND3.3V3.3VRX(3)TXTX(2)RX3.3VEN