A fatal esptool.py error occurred: Failed to connect to ESP8266: Timed out waiting for packet header

when I upload the code the error appears

What is the solution of this problem؟

NOTE:
the code
image

tools:

The same problem occurs if the board is changed to any ESP
and there is no other port

is the module in flashing mode?

how can i know ??
this is my first time using ESP

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.