0

上传时出现此错误:

Arduino: 1.8.13 (Windows Store 1.8.42.0) (Windows 10), Board: "Generic ESP8266 Module, 80 MHz, Flash, Legacy (new can return nullptr), All SSL ciphers (most compatible), dtr (aka nodemcu), 26 MHz, 40MHz, DOUT (compatible), 1MB (FS:64KB OTA:~470KB), 2, nonos-sdk 2.2.1+100 (190703), v2 Lower Memory, Disabled, None, Only Sketch, 115200"
Executable segment sizes:
IROM   : 236720          - code in flash         (default or ICACHE_FLASH_ATTR) 

IRAM   : 26892   / 32768 - code in IRAM          (ICACHE_RAM_ATTR, ISRs...) 

DATA   : 1252  )         - initialized variables (global, static) in RAM/HEAP 

RODATA : 780   ) / 81920 - constants             (global, static) in RAM/HEAP 

BSS    : 24976 )         - zeroed variables      (global, static) in RAM/HEAP 

Sketch uses 265644 bytes (27%) of program storage space. Maximum is 958448 bytes.

Global variables use 27008 bytes (32%) of dynamic memory, leaving 54912 bytes for local variables. Maximum is 81920 bytes.

esptool.py v2.8

Serial port COM3

Connecting........_____....._____....._____....._____....._____....._____.....____Traceback (most recent call last):

  File "C:\Users\Arsh\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.7.4/tools/upload.py", line 65, in <module>

    esptool.main(cmdline)

  File "C:/Users/Arsh/Documents/ArduinoData/packages/esp8266/hardware/esp8266/2.7.4/tools/esptool\esptool.py", line 2890, in main

    esp.connect(args.before)

  File "C:/Users/Arsh/Documents/ArduinoData/packages/esp8266/hardware/esp8266/2.7.4/tools/esptool\esptool.py", line 483, in connect

    raise FatalError('Failed to connect to %s: %s' % (self.CHIP_NAME, last_error))

esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for packet header

esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for packet header  
or it says Invalid Head of Packet(0xF0)


_



This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

这是引脚配置:

使用稳压器安装 3.3v im。
RX 也连接到 RX 和 TX 到 TX。

代码:


#include <ESP8266WiFi.h>

void setup()
{
  Serial.begin(115200);
  Serial.println();

  WiFi.begin("username", "password");

  Serial.print("Connecting");
  while (WiFi.status() != WL_CONNECTED)
  {
    delay(500);
    Serial.print(".");
  }
  Serial.println();

  Serial.print("Connected, IP address: ");
  Serial.println(WiFi.localIP());
}

void loop() {}

有人建议将GPIO0接地,没有用。
尝试安装不同版本的主板:“通用 ESP8266 模块”仍然出现相同的错误。

该模块在没有使用 Board 的库的情况下工作正常:“arduino uno”

4

2 回答 2

2

GPIO-00 需要在 RESET 接地时保持接地,然后返回高电平。这会将 ESP-01 重新启动到 FLASH 模式。

要全面了解实现此目的的电路,请阅读: https ://www.allaboutcircuits.com/projects/flashing-the-ESP-01-firmware-to-SDK-v2.0.0-is-easier-now/

在此处阅读有关 ESP8266 启动模式的信息: https ://tttapa.github.io/ESP8266/Chap04%20-%20Microcontroller.html

于 2021-04-30T20:31:56.707 回答
1

您能否提供有关您使用的 3.3V 稳压器的更多详细信息?你有它连接在串行信号之间吗?

如果是这种情况,我建议改为:

3.3V信号分压器

ESP TX 和 Arduino RX 可以直接连接,没有任何问题

于 2021-04-30T15:46:08.467 回答