How to program a D1 Mini ESP32?

I've been using and loving these ESP32 dev boards:

And am now trying a D1 mini ESP32:

https://www.aliexpress.com/item/32839344778.html?spm=a2g0s.9042311.0.0.1d194c4djI3PvY

I'm having an oddly hard time finding details on using it. For one thing it doesn't have a "program" button like the dev board in the first link, and reading an Amazon review someone said you need to trigger one of the GPIO pins. But I can't find any info on which pin that is, or how to do it.

Another issue is that I can't find which pin to connect Neopixel LEDs to. I know that eventually I should level shift the 3.3v, but I should be able to at least run some tests with them directly connected I think.

Attached is an easy to read pin out.

wrybread:
I'm having an oddly hard time finding details on using it. For one thing it doesn't have a "program" button like the dev board in the first link, and reading an Amazon review someone said you need to trigger one of the GPIO pins. But I can't find any info on which pin that is, or how to do it.

I don't have any experience with this particular board, but many of them have circuitry that will automatically toggle the pin. So you just click the "Upload" button in the Arduino IDE and everything happens automatically. Give it a try.

wrybread:
Another issue is that I can't find which pin to connect Neopixel LEDs to. I know that eventually I should level shift the 3.3v, but I should be able to at least run some tests with them directly connected I think.

Connect the LED data pin to any IO pin on the board you like. You define the pin to use in your sketch. Just check out the example sketches of the library you are using to control the Neopixels and you'll see how it works.

Give it a try.

I should have mentioned, of course I did. The Arduino IDE just spins out looking for the board.

I'm not sure I have the right board selected in Tools -> Boards. I currently "ESP32 Dev Module" selected.

Just check out the example sketches of the library you are using to
control the Neopixels and you'll see how it works.

I have it all working with many other boards, and they all have pins that people recommend using. Oddly I can't find any such info for this board.

Please do this:

  • (In the Arduino IDE) File > Preferences
  • Uncheck the checkbox next to "Show verbose output during: compilation"
  • Check the checkbox next to "Show verbose output during: upload
  • Click "OK"
  • Sketch > Upload
  • After the upload fails, you'll see a button on the right side of the orange bar "Copy error messages" (or the icon that looks like two pieces of paper at the top right corner of the black console window in the Arduino Web Editor). Click that button.
  • In a forum reply here, click on the reply field.
  • Click the </> button on the forum toolbar. This will add the forum's code tags markup to your reply.
  • Press "Ctrl + V". This will paste the upload output between the code tags.
  • Move the cursor outside of the code tags before you add any additional text to your reply.

It's simply not detecting the board. With other ESP32 boards I've had to press a "program" or "boot" button, which this board lacks.

But for the record, here's where it errors out:

esptool.py v2.6
Serial port COM34
Connecting........_____....._____....._____....._____....._____....._____.....____An error occurred while uploading the sketch
_

A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header

I haven't used this particular board, but does this YouTube video help?

Just tested uploading an example sketch to my D1 Mini Esp32 with no problems.
Works selecting either ESP32 Dev Module or Wemos D1 mini esp32 using the Arduino IDE.
Have you tried to press the small RST button during the connection attempts?
I have had connection problems with other boards where hitting Reset or Boot/Load have worked.
The D1 Mini Esp32 should have the logic to control the pins for program load.

Thanks for that.

When it works for you, do you need to press that little button on the side? Looking at it with a magnifying glass it's labelled "RST".

I just found the "Wemos D1 Mini ESP32" board on the boards list, which is promising, but I can't get it to upload anything to that board, whether I press the RST button or not.

What do you have selected for Programmer in the Arduino IDE? I have "AVRisp mkII". My other params:

Upload Speed: 921600
CPU Frequency: 240 MHZ (wifi/bt)
Flash frequency: 80 mhz
Parition scheme: default
Programmer: AVRISP mkII

Seems that you have a problem with the flash enable circuit, or a defective module.
As you can connect to the D1, the ESP32 module itself ought to be active.

I used the same parameters in the IDE, except the programmer which is not relevant. No need to push the button.

If you want to go on trying to make it work, here are a few hints.

You can find a schematic of a D1 mini esp32 here:

If you want to try to manually enable the flash using an external circuit, search for 'esp32 boot enable'.
There you find descriptions of how to wire an ESP32 for manual flash enable using two push buttons etc.

It works using a bare ESP32.

For anyone else who comes down this path, short ground to the IO0 pin to get it to flash if your D1 mini ESP32 isn't flashing automatically.

Open sesame

As a note, I use ESP32 developer boards, I found that by using a powered USB hub to connect the ESP32, I do not have to press the button for program uploads.

A 10uF capicitor plugged into the RST & GND socket on the board fixed it for me.

And you don't need press reset button - it gets rid of the above error and programs via USB perfectly.

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