# ESP32 Development Module

Spring 2019

You are not logged in.

Note that this link will take you to an external site (https://oidc.mit.edu) to authenticate, and then you will be redirected back to this page.

## 1) Overview

For 6.08 we'll be using the ESP32 Dev Board Version C.

Company documentation for this particular developoment board can be found here. This page includes datasheets both for the ESP32 chip, the ESP32-WROOM module, and the ESP32 Dev module (different layers of of the microcontroller).

## 2) Hardware and Hookup

Because of the unconventional size of the ESP32 devboard, we strongly recommend you mount it as we depict in Lab 01A to give maxiximum flexibility in using pins.

## 3) Software

In order to program the ESP32 development board in our class we'll use the ESP32 core for the Arduino. This requires three separate installation steps (see main documentation page for links and details):

• First the Arduino environment
• Then the ESP32 Arduino Core
• Then the interfacing USB cable driver

### 3.1) General Functionality

There is no onboard LED that you'll often see on traditional microcontroller boards that are used for "blink" demos. Instead a simple are-you-there test to make sure you can program is using the Serial monitor. The

void setup() {
Serial.begin(115200); //begin serial communication
}

void loop(){
Serial.println("Testing"); //print "Testing"
delay(1000); //wait 1000 ms (1 second)
}


The result of this should be

Testing
Testing
Testing


printed ad nauseum in your Arduino Serial monitor, which is accessible by going to Tools>Serial Monitor (make sure the correct Serial port object is selected). Additionally make sure the baud in the serial monitor matches what you specify in your Serial.begin call (in this case 115200).

### 3.2) WiFi

Many libraries exist to break out some of the ESP32's networking and WiFi functionality. The ESP32 can join most 802.11 b/g/n networks, which are most standard 2.4 GHz access points, including open and closed networks.

The example code found here shows how to connect to the strongest open network that is around. If I get some time, I'll package this up in a way that is cleaner, but for now, you'll need that pile of code in your setup.

The code here is similar to the one above, but shows a way of having it to automatically reconnect if the network drops.

### 3.3) Bluetooth

There is a somewhat developed BLE (Bluetooth Low Energy) stack for the Arduino ESP32 core. The teaching staff has limited experience using it, but you are welcome to experiment with it!

This page was last updated on Monday February 11, 2019 at 09:21:06 PM (revision 3b41ede).