ESP32 Thing Plus (USB-C) Hookup Guide

Pages
Contributors: santaimpersonator, Brudnerd
Favorited Favorite 3

Arduino Example: Blink

First-Time Users:

With the driver and ESP32 Arduino core installed, users are ready to program their board! When selecting a board to program, users should select the SparkFun ESP32 Thing Plus C in the Arduino IDE.

Once the ESP32 Thing Plus is connected to a computer with a USB cable, the board will be assigned a unique port identifier. On Windows machines, this should appear as COM#, and on Macs or Linux computers it should be /dev/tty.usbserial-####### in the Arduino IDE. Before code can be uploaded, users will need to select the port that the board has been assigned to.

Loading Blink

To make sure the toolchain and board are properly set up, let us try to upload a simple sketch! The STAT LED attached to GPIO 13 is perfect for a simple test. Copy and paste the example sketch below into a fresh Arduino sketch:

language:c
int ledPin = 13;

void setup()
{
    pinMode(ledPin, OUTPUT);
    Serial.begin(115200);
}

void loop()
{
    Serial.println("Hello, world!");
    digitalWrite(ledPin, HIGH);
    delay(500);
    digitalWrite(ledPin, LOW);
    delay(500);
}

With everything setup correctly, upload the code! Once the upload is complete, open the serial monitor and set the baud rate to 115200. Users should see a Hello, world! print statement begin to fly by.

If the blue LED remains dimly lit, it's probably still sitting in the bootloader. After uploading a sketch, users may need to tap the RST button to get their ESP32 Thing Plus to begin running the sketch.

Example serial port output

Users may also notice that when the ESP32 boots up it prints out a long sequence of debug messages. These are emitted every time the chip resets -- always at 115200 baud.