January 20, 2017

How to use the DOIT ESP32 DEVKIT

ESP32

I have successfully used the WeMos D1 mini ESP8266 dev board for a while. This is a high quality, well documented board available for $2.60 here.

Now that the ESP32 is released, a number of dev boards have arrived. They are a lot more expensive than the ESP8266 boards. Recently I found the DOIT ESP32 DEVKIT for a reasonable price, on Ebay. I payed GBP19 for ESP-32 ESP-32S Development Board 2.4GHz Dual-Mode WiFi+Bluetooth Antenna Module.


This board is not as well documented and there is not much information at all from the seller.
But I got it working after a lot of work and here's how. I used a Mac, but it should work with linux and Windows too.

Steps

  1. Download and install Arduino IDE
  2. Open web page  https://github.com/espressif/arduino-esp32 and follow the instructions under Installation Instructions/Using through Arduino IDE, for your operating system
  3. Install driver for the serial chip used to connect the board to your PC by USB, from the page http://www.silabs.com/products/mcu/pages/usbtouartbridgevcpdrivers.aspx
  4. Connect the board to your PC with a USB to micro USB cable
  5. In Arduino IDE, use File/New and paste the test program below
  6. Select Tools/Board ESP32 Dev Module
  7. Select Tools/Port /dev/cu.SLAB_USBtoUART (on Windows and Linux the name is different)
  8. Press the small BOOT button and click the Upload button in Arduino IDE, and wait until alot has happened in the log in the bottom of the window - it takes about 15 seconds (I kept the BOOT button pressed during the whole upload, but that may not be neccessary) 
  9. Open the Tools/Serial Monitor and select 115200 baud
  10. Now you should see the word Hello printed every second (you may push the EN button to reset the board, in order to see this)

Test program

void setup() {
  Serial.begin(115200);
  delay(200);
}
void loop() {
  Serial.write("Hello!\n");
  delay(1000);
}

Not achieved yet

  • I haven't found how to control the on-board LED yet
  • I haven't found any schematics for the board

PlatformIO

I prefer to use PlatformIO when developing for Arduino, EPS etc. But according to https://github.com/platformio/platform-espressif32/issues/5, the Arduino IDE has to be used the first time, to get the DOIT ESP32 properly initialized.

In PlatformIO, I select the board Espressif/Espressif ESP32 Dev Module.