Unable to Upload Code onto the Soil Sensor V2.2

I was happily using setting up the Soil Sensor V2.2 as per the instruction described in this webpage, however the 8 pin connector which the ESP Flasher Rev4 connects to broke. So I’ve tried to create a work around by taking advantage of the female connectors on the Flasher and some male pins I soldered on the soil sensor.

Unfortunately, I am now unable to upload code. With the following error.
(Do note that this output is from the ESP8266 blink example code supplied with the board library which I chose to reduce complexity in the troubleshooting)

Build options changed, rebuilding all
Sketch uses 247888 bytes (49%) of program storage space. Maximum is 499696 bytes.
Global variables use 28016 bytes (34%) of dynamic memory, leaving 53904 bytes for local variables.  Maximum is 81920 bytes.
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
error: espcomm_upload_mem failed

From my research this has to do with some wiring connection problem, however I don’t know what I’m doing wrong from seeing as I have tried the following:

  • Double and triple checked my wiring
  • Checked the continuity of the pins again
  • Different ESP8266 code
  • Different ESP8266 boards in the Arduino IDE, including the Generic ESP8266 Module and the NodeMCU 1.0 (ESP-12E Module)
  • Pressing the Reset and Flash button prior to uploading
  • Swapping the RX and TX pins around
  • Using a different micro USB cable
  • Slower upload speeds (57600)
  • Slower flash frequency (40MHz)

Even though I am unable to upload code, when I plug the USB cable into the Flasher, the blue LED on the ESP8266 turns on for a fraction of a second, which means my power and ground lines must be correctly wired.

I am running:

  • MacOS Mojave on a 2014 MacBook Air
  • Arduino Version 1.8.6
  • ESP8266 board library 2.4.2

Would you know what is causing the problem, for example is it my wiring, process of doing this, etc.?

Here are photos of my setup and wiring:

The way I worked out the pins were through using the continuity setting on my multimeter to test the connections between where the broken 8 pin connector was and the pins which I soldered on as a replacement. As the pinouts are obviously the same on the Flasher, I used the continuity tester on that board to double check what the small male pins connected to what larger female pins, noting the orientation which the Flash would have faced when uploading.

Please remove the jumper for GPIO16 if you want to program the board.

Thanks for the suggestion, however there is no difference if I remove the jumper. I get the same error. I have since checked the continuity of the 2nd RST and GPIO16 and discovered that they are connected to the following:

2nd RST is connected to RST
GPIO16 is connect to D0

Also, as a result of disconnecting the jumper, D0 is no longer connect to either of the RSTs. I have therefore removed any connection between D0 and RST and tried my testing again still get the same error.

Do you have any other suggestions?

I don’t know if it helps, but I was able to upload code prior to the small female headers breaking off with the jumper connected between GPIO16 and the 2nd RST. This is likely because this is version 2.2 of the board, not version 2.1 which must have the jumper removed according to this link under Quick Start.

This is an update on my wiring diagram with a dashed line for when the jumper is on:

The PCB version 2.2 and version 2.1 is same board. no difference.

Why did you remove the female socket for P1. It should be the best to wire ESP Flasher and the sensor.

Swapping the RX and TX pins around

I suggest you also try this step again.

@aprilpea, thanks for the clarification about the board version. I did not remove the female socket P1, rather it broke off.

I have tried swapping the RX and TX pins around again and still get the same error I have described above.

For clarification, here is my wiring:

Flasher to ESP8266
TX -> RX
IOO -> D3
IO2 -> D4
VCC -> 3V3
EN -> 3V3
RX -> TX

Would you have any other recommendations? I believe it has to be something with my wiring or the Flasher which is causing the problem, but because I don’t know the solution at this point in time.

There is only one other thing I can think of and that would be pressing the RESET or FLASH buttons on the Flasher sometime during uploading process from the Arduino IDE, however would this be of any benefit?

I use multimeter check the pins when wired ESP flasher with P1 socket. It’s like this

TX -> TX
IO0 -> D3
IO2 -> D4
VCC -> 3V3
EN -> EN
RX -> RX

don’t wire Flasher EN to ESP8266 3V3 directly. You may bypassed the pin EN for ESP8266 in previous wire.

I also suggest you choose a shorter usb cable. Because ESP8266 is power hungry.

Okay, it’s starting to make some sense, however I would like some clarification.

You state that you don’t connect the Flasher EN wire directly to 3V3 and rather connect it to EN, however, there is no such connection labelled as that, as shown in the photo below:

You also mention that:

You may bypassed the pin EN for ESP8266 in previous wire.

Would you be able to clarify what is meant by this?


Please check the P1 pinouts. From the icon arrow, the pin EN is the 2nd pin.


That is completely right. So from what I understand, you saying that there is no such pin “EN” that is one of the male headers and rather if I want to connect to EN I must use the 2nd pin from where the female headers have broken off.

Therefore I am curious why isn’t there a male connection for EN?

For future reference, here is a pinout of the broken female headers (do note that I think I’m labelling TX and RX different to you @aprilpea, however there is no difference in the outcome of the wiring):

You can also check the Diagram pictures at our ESP Flasher wiki for the pinouts

I’m reading your pinouts of the ESP8266 and they seem to follow what I’m saying, which I have featured below, however there’s one thing missing… There’s no mention IO2 (GPIO2). Is there any reason for this or is it a mistake as the female header connection 7 seems to be connected to it?

flasher pin ESP module pin

In fact GPIO2 is useless for programming ESP8266. It’s just for compatible with the pinouts of ESP-01 module

So I don’t even need it then, nice!

Let me try out the EN wiring and get back to you…

And also, was there a reason for no male connection for EN and only one on the female header pinouts?

The male connection is designed for compatible with our ESPea module. The pin EN is wired by ESPea board internal. So there’s no pin EN alone for soil sensor.

I’m trying to upload the code like this and it’s not working once again. Would you suggest soldering it?

So sad… I’d like to ship a new one with the female socket P1 to you. Please send your shipping address to me by private message;

Thank you very much. I’ll send you a message.

I’m unable to send you a private message @aprilpea.

It says “You are unable to send a private message to that user”.