Getting started with the ESP32 Wifi module

The ESP32 Wifi module can replace an Arduino, as it has similar properties. It’s main advantage is that it is faster, has more memory and has WiFi and Bluetooth on board. Just like the Arduino Nano it can be mounted on a breadboard. This allows building very compact prototype circuits:

Make module ready for use in Arduino IDE

Start the Arduino IDE. Choose File > Preferences. At “Additional Boards Managers URLs” enter "" (without the quotes).
Now choose Tools > Boards > Boards Manager. Enter “esp” in the search field.
Click on “esp32 by Espressif Systems” and click the Install button.

To check if the module works, connect it with a USB cable to your computer and upload this sketch: esp32_blink.ino. This example uses the onboard LED, which is on pin 22 of the board.

If using Blynk you can start with the example sketch “ESP8266_Shield” via File > Examples > Blynk > Boards_WiFi or load my complete example: esp32_blynk.ino

Specifics for the LOLIN32 Lite

If you have a LOLIN32 Lite, right after installation of the ESP32 Arduino Core, set the Board to “WEMOS LOLIN32” and Upload Speed to 115200:

For the Serial Monitor set the speed to 115200 also.

Connect via Bluetooth

You can also connect to the module via Bluetooth, eg. with this this example sketch: esp32_bluetooth_led_control.ino. More information about this in this tutorial. Install a Bluetooth Terminal App on your phone, and send an “1” to turn on the LED, and a “0” to turn it off.

Hook up a Humidity & Temperature sensor

For this example, I added a DHT sensor connected to pin 0 of the ESP32 (you can use the pin numbers as printed on the module). It also needs a pull up resistor (4K7 or 10K) between VCC and the DATA pin, like this example.
For the DHT sensor, use the ESP specific library, via Sketch > Include Library > Manage Libraries, search for “DHT”, pick “DHT sensor library for ESPx”.

I used the same Blynk App as used for the ESP8266 Blynk introduction. this will show the Humidity & Temperature values in the LCD Widget of the Blynk App:

Next: Create a connected sensor

To learn more about using the ESP32 module, go to the tutorial “Create a connected sensor”

More information

Sparkfun’s “ESP32 Thing Hookup Guide”