1

我做了很多工作来使这些模块工作,但他们没有。

模块:ESP8266 ESP-01 模块图片

我用不同的方法和软件上传了几个版本的AT固件,并测试了用不同的软件发送AT命令。但我没有得到任何回应。然后我尝试了 Arduino IDE 并上传了 GPIO2 的闪烁示例,但它也无法正常工作。

LED 在正常模式下复位后保持熄灭。我尝试将其打开而不闪烁,将 GPIO2 设置为低,但结果相同。我也在 GPIO2 上使用 100 欧姆电阻器测试了外部 LED。

我有 2 个模块并测试了它们。

现在我只使用闪烁的示例细节来简化事情。

连接:

  • VCC (pin8) : 3.3 V (测试USB和外接电源)
  • 接地(引脚1):接地
  • CH_PD(引脚 4):3.3 V
  • RESET(pin6):用10k电阻上拉。和 GND 脉冲用于改变模式。
  • TXD(pin2):usb2串口模块RXD
  • RXD(pin7):usb2串口模块TXD
  • GPIO0 (pin5) : 接 GND 上传,浮空测试。
  • GPIO2 (pin3) : 无任何测试,也使用外部 LED。

我使用 ch140 usb2serial 模块连接到笔记本电脑。它在 COM3 上被识别。它的 GND 连接到面包板的 GND。我从 USB 和外部电源测试了 3.3。要进入上传模式,我将 GPIO0 连接到 GND 并将 GND 脉冲连接到 RESET。然后在正常模式下断开 GPIO0 并将 GND 脉冲到 RESET。我也用另一种方法测试过。

两个模块都可以正常上传固件和代码,但无法正常工作。上传时蓝色 LED (GPIO2) 闪烁。

代码 :

void setup() {
  pinMode(2, OUTPUT);     // Initialize the LED_BUILTIN pin as an output
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(2, LOW);   // Turn the LED on (Note that LOW is the voltage level
  // but actually the LED is on; this is because
  // it is active low on the ESP-01)
  delay(1000);                      // Wait for a second
  digitalWrite(2, HIGH);  // Turn the LED off by making the voltage HIGH
  delay(2000);                      // Wait for two seconds (to demonstrate the active low LED)
}

使用 LED_BUILTIN 字和数字 2 测试的代码。

IDE 设置图像

还使用其他一些设置进行了测试,例如 Flash 大小和 Flash 模式以及重置方法。

IDE 和上传结果图片

上传结果文本:

Executable segment sizes:


IROM   : 227612          - code in flash         (default or ICACHE_FLASH_ATTR) 


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


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


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


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


Sketch uses 256312 bytes (26%) of program storage space. Maximum is 958448 bytes.
Global variables use 26804 bytes (32%) of dynamic memory, leaving 55116 bytes for local variables. Maximum is 81920 bytes.
esptool.py v2.8
Serial port COM3
Connecting....
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: 2c:3a:e8:0c:18:c9
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 1MB
Erasing flash (this may take a while)...
Chip erase completed successfully in 5.3s
Compressed 260464 bytes to 190653...

Writing at 0x00000000... (8 %)
Writing at 0x00004000... (16 %)
Writing at 0x00008000... (25 %)
Writing at 0x0000c000... (33 %)
Writing at 0x00010000... (41 %)
Writing at 0x00014000... (50 %)
Writing at 0x00018000... (58 %)
Writing at 0x0001c000... (66 %)
Writing at 0x00020000... (75 %)
Writing at 0x00024000... (83 %)
Writing at 0x00028000... (91 %)
Writing at 0x0002c000... (100 %)
Wrote 260464 bytes (190653 compressed) at 0x00000000 in 16.9 seconds (effective 123.3 kbit/s)...
Hash of data verified.

Leaving...
Soft resetting...

谢谢!:)

4

0 回答 0