我想通过 Arduino UNO 对 ESP8266MOD 进行编程,原理图是:
照片是:
Arduino UNO 代码是:
代码:
全选/*
* testESP8266 - AT
*/
#include
SoftwareSerial ESPserial(8, 7); // RX | TX
void setup()
{
Serial.begin(115200); // communication with the host computer
//while (!Serial) { ; }
// Start the software serial for communication with the ESP8266
ESPserial.begin(115200);
Serial.println("");
Serial.println("Remember to to set Both NL & CR in the serial monitor.");
Serial.println("Ready");
Serial.println("");
}
void loop()
{
// listen for communication from the ESP8266 and then write it to the serial monitor
if ( ESPserial.available() ) { Serial.write( ESPserial.read() ); }
// listen for user input and send it to the ESP8266
if ( Serial.available() ) { ESPserial.write( Serial.read() ); }
}
问题是当我想进入 AT 模式时,我将 CH_PD 连接到 GND,然后打开电源,然后将其连接到 VCC,当我在 Arduino IDE 串行监视器中键入“AT”时,没有任何反应。