ESP32-C3 OLED/Getting your computer to see it/04. Arduino IDE, set up for this board
Getting your computer to see it · 04 of 9

Arduino IDE, set up for this board

There is no driver to install and no bridge chip to argue with. There are five Tools rows, and one of them decides whether Serial.println reaches you or goes out of a header with nothing on it.

Nothing to install

Install the ESP32 boards package from the Boards Manager — search for esp32 by Espressif — and that is the whole of the setup. There is no driver step in this book because there is nothing to drive: the USB-C socket goes directly to a USB peripheral inside the C3, so the port your computer sees is presented by the chip itself. Windows, macOS and Linux all have what they need already.

That also means the port is only there while the chip is running. Reset the board and the port disappears and comes back, which is not a fault and is covered below.

The five rows

Pick ESP32C3 Dev Module under Tools ▸ Board ▸ ESP32 Arduino, and then five rows matter:

Tools rowSet it to
BoardESP32C3 Dev Module
USB CDC On BootEnabled
Flash Size4MB (32Mb)
Partition SchemeDefault 4MB with spiffs
Upload Speed921600, or 115200 if uploads fail

Everything else can stay where the board selection puts it.

The row that goes wrong

Serial on this chip is a name rather than a wire, and USB CDC On Boot is what binds it. Enabled, it is the USB peripheral and your text comes back up the cable you uploaded through. Disabled, it is UART0 — GPIO 21 and 20, out on the right-hand header, where you have nothing plugged in.

USB CDC On Boot decides where Serial goes
the USB socket
Tools → USB CDC On Boot
Serial is bound to
USB
Serial Monitor shows
your output
Enabled is what you want on this board. There is no separate USB-to-serial chip: the socket is wired to a USB peripheral inside the C3, and this row binds Serial to it. Upload and monitor are then the same port.

The reason this one is worth a figure rather than a line in a table is that it has no symptom. The upload succeeds, because uploading does not go through Serial. The board runs. The screen works. The Monitor stays empty, and every check a beginner knows how to make says the sketch is fine.

It is compiled in, so changing the row and pressing the Monitor button does nothing. Change it and upload again.

Why LOW lights the LED

The blue LED sits between the 3.3 V rail and GPIO 8, so the pin has to pull the other end of it down to make current flow. digitalWrite(8, LOW) lights it and HIGH turns it off, which is backwards from what most examples assume and is worth knowing before you spend ten minutes deciding your board is broken.

Once that sketch blinks and prints, the toolchain is done and everything after this is about the board rather than the computer.

The code

hello_c3.ino

The first sketch to upload, and the one that tells you which of the two things went wrong if something did. It blinks the blue LED so you get an answer without the Serial Monitor, and prints so you get one with it.

/*  Lonely Binary ESP32-C3 OLED — is anyone listening?
    Tools > Board:            ESP32C3 Dev Module
    Tools > USB CDC On Boot:  Enabled
    Tools > Flash Size:       4MB (32Mb)                */

const int LED = 8;          // the blue one, marked IO8

void setup() {
  pinMode(LED, OUTPUT);
  Serial.begin(115200);
  delay(1500);              // let the USB port enrol and be opened
  Serial.println("ESP32-C3 OLED, awake");
}

void loop() {
  digitalWrite(LED, LOW);   // pulled up on the board: LOW is lit
  delay(200);
  digitalWrite(LED, HIGH);
  delay(800);
  Serial.printf("up %lu s\n", millis() / 1000);
}

The delay after Serial.begin is not superstition on this board. The serial port is created by the chip's own USB peripheral, so it does not exist until the chip has enrolled as a USB device and your computer has opened it — anything printed before that is printed to nobody.

When it does not work

No port appears in the Tools menu at all

Try a different cable before anything else. A charge-only USB-C lead has no data pair in it, and it powers the board perfectly — the red LED lights, the screen may even show something — while presenting nothing to your computer. Use a cable you have moved a file with.

The upload works and the Serial Monitor stays empty

USB CDC On Boot is Disabled. That row is compiled into the sketch rather than applied by the Monitor, so changing it means uploading again. Until you do, Serial.println is going out of GPIO 21 into a header with nothing attached.

The port disappears every time the board resets

That is normal here and not a fault. The serial port is created by the chip itself, so a reset takes the port down with it and your computer has to re-enumerate it. Serial monitors that do not reconnect on their own will look dead — close and reopen the Monitor after a reset.

The upload fails part-way through with a timeout

Drop Tools > Upload Speed to 115200 and try again. If it still fails at the start rather than part-way through, it is not a speed problem — go to manual download mode, which is the next article.

Where this goes next

Two buttons, in an order that matters, and the one instant during which the chip is looking.

When the upload fails: manual download mode

Edit this page — content/boards/c3-oled/arduino-ide-setup.mdx

Community

Questions about this product

See what other owners have asked, and read their solutions.

Ask a question ↗

ESP32-C3 OLED Development Board with Expansion Base

Loading discussions…

Discuss this article

Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.

Browse ESP32-C3 OLED on the forum