|
运行的源码是这样滴,然后出错了呜呜
#include <SoftwareSerial.h>
SoftwareSerial mySerial(3, 2); // RX, TX
void setup() {
Serial.begin(9600);
while (!Serial) {;}
Serial.println("hardware serial!");
mySerial.begin(115200);
mySerial.println("software seria");
}
void loop() {
if(mySerial.available())
Serial.write(mySerial.read());
if(Serial.available())
mySerial.write(Serial.read());
}
这段代码,看别人编译是成功的,自己编译出现了下面的错误:
Arduino:1.8.16 (Windows 10), 开发板:"Generic ESP8266 Module, 80 MHz, Flash, Disabled (new aborts on oom), Disabled, All SSL ciphers (most compatible), 32KB cache + 32KB IRAM (balanced), Use pgm_read macros for IRAM/PROGMEM, dtr (aka nodemcu), 26 MHz, 40MHz, QIO (fast), 1MB (FS:512KB OTA:~246KB), 2, nonos-sdk 2.2.1+100 (190703), v2 Lower Memory, Serial, None, Only Sketch, 115200"
Executable segment sizes:
ICACHE : 32768 - flash instruction cache
IROM : 241328 - code in flash (default or ICACHE_FLASH_ATTR)
IRAM : 29677 / 32768 - code in IRAM (IRAM_ATTR, ISRs...)
DATA : 1496 ) - initialized variables (global, static) in RAM/HEAP
RODATA : 1060 ) / 81920 - constants (global, static) in RAM/HEAP
BSS : 26064 ) - zeroed variables (global, static) in RAM/HEAP
项目使用了 273561 字节,占用了 (54%) 程序存储空间。最大为 499696 字节。
全局变量使用了28620字节,(34%)的动态内存,余留53300字节局部变量。最大为81920字节。
esptool.py v3.0
Serial port COM9
Connecting........_____....._____....._____....._____....._____....._____.....____Traceback (most recent call last):
File "C:\Users\john\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.1/tools/upload.py", line 66, in <module>
esptool.main(cmdline)
File "C:/Users/john/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/3.0.1/tools/esptool\esptool.py", line 3552, in main
esp.connect(args.before, args.connect_attempts)
File "C:/Users/john/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/3.0.1/tools/esptool\esptool.py", line 529, 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
_
在文件 -> 首选项开启
“编译过程中显示详细输出”选项
这份报告会包含更多信息。
暴风哭泣T=T,有没有哪位大佬帮看一下是什么原因???
|
|