ESP32-DevKitI2C-RGB Getting Started Guide

Overview

This guide shows how to start using the ESP32-DevKitI2C-(RGB) development board. ESP32-DevKitI2C-RGB is a small-sized ESP32-WROOM-32E based development board using a powerful and affordable WiFi module from Espressif. Some of the I/O pins are broken out to the pin headers on both sides for easy interfacing. Developers can either connect sensors using a 2.54mm pitch connector or a QWIIC/STEMMA/uSup connector or mount ESP32-DevKitI2C on a breadboard. This board is fully SW compatible with ESP32-DevKitC-32E so any code or settings used with ESP32-DevKitC-32E (WS2812B which is missing on the original ESP32-DevKitC-32E board) will work. For Arduino environment please choose ESP32 Dev Module while working with this board.

A screenshot of the Arduino IDE shows the selection of 'ESP32 Dev Module' under the 'Board' menu, indicating the correct board configuration for this development board.

Other SW platforms like Tasmota or ESPHome are working in the same way as with ESP32-DevKitC-32E board + there is a full color LED available for status indication.

Available Versions

All versions are equipped with QWIIC/uSup/STEMMA compatible connector in order to allow developers use a wide range of available sensors from different suppliers (Adafruit, Sparkfun, Laskakit, etc).

Key Components

Key ComponentDescription
ESP32-WROOM-32 ENA module with ESP32 at its core. For more information, see ESP32-WROOM-32 Datasheet.
USB-to-UART BridgeReset button. Single USB-UART bridge chip provides transfer rates of up to 3 Mbps. FT231Q is used.
USB A PortUSB interface. Power supply for the board as well as the communication interface between a computer and the ESP32-WROOM-32 module.
Neopixel WS2812B LEDFor details see the schematics in Related Documents and sample code at the end of this User Guide. Some of the pins on the ESP module are broken out to the pin headers on the board. GPIO16-19, 23, 26, 27, 32, 34, 39 are broken out for further use.

Component Placement and Dimensions

The board has dimensions of 74.42mm x 25.50mm. Key components include the ESP32-WROOM-32 module, USB connector, reset button, QWIIC/STEMMA connector, and the WS2812B NeoPixel LED. The bottom view shows the USB/UART converter chip (FT231Q), QWIIC connector (BM04B-SRSS-TBT), and the reset button.

The top view of the ESP32-DevKitI2C-RGB board displays the ESPRESSIF ESP32-WROOM-32E module (FCC ID: 2AC7Z-ESP32WROOM32G, IC ID: 21008-ESPWROOM32G), USB connector, power regulation components (LM1117-3.3), and the NeoPixel LED (LED1).

Power Supply

The board is powered from the USB port, requiring 5VDC/200mA max. Any standard 5V USB A adapter or charger can be used.

Schematic Diagram

A detailed electronic schematic of the ESP32-DevKitI2C-RGB board. It outlines the connections for the ESP32-WROOM-32 module, USB-to-UART bridge (FT231Q), power supply circuitry including a 3.3V regulator (LM1117-3.3), and the WS2812B NeoPixel LED. It details the connections for GPIO pins, I2C bus (SDA, SCL) and UART (TXD, RXD), and power.

Code Examples

Arduino Example: SCD4x CO2 Sensor and TMEP.CZ Cloud Service

This section provides sample Arduino code for using the SCD41 CO2 sensor with the ESP32-DevKitI2C board and sending data to the TMEP.cz cloud service. The code includes setup for WiFi connection, sensor initialization, reading temperature, humidity, and CO2 levels, and sending this data via HTTP POST requests.

The code configures the NeoPixel LED to indicate CO2 levels:

The sample code includes:

#include <WiFiManager.h>
#include <HTTPClient.h>
#include <Adafruit_NeoPixel.h>
#include <Wire.h>
#include "SparkFun_SCD4x_Arduino_Library.h"

#define PIN 2
#define NUMPIXELS 1
Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);

// Server configuration
String serverName = "http://myCO2sensor.tmep.cz/index.php?";
String GUID = "GUID"; // Replace with your sensor's GUID

SCD4x SCD41;

void setup() {
  Serial.begin(115200);
  Wire.begin();
  delay(10);

  WiFiManager manager;
  // manager.resetSettings(); // Uncomment to reset WiFi settings
  bool success = manager.autoConnect("ESP32_AP", "password");

  if (!success) {
    Serial.println("Failed to connect");
  } else {
    Serial.println("Connected");

    // Initialize SCD41 sensor
    if (SCD41.begin(false, true) == false) {
      Serial.println("SCD41 not found, check your connection");
      while (1);
    }

    // Optional: Enable Low Power mode
    if (SCD41.startLowPowerPeriodicMeasurement() == false) {
      Serial.println("Low power mode enabled");
    }
  }
}

void loop() {
  // Wait for first measurement data (approx. 30s)
  while (!SCD41.readMeasurement()) {
    delay(100);
  }
  SCD41.readMeasurement(); // Read current measurement

  // Set NeoPixel LED color based on CO2 level
  if (SCD41.getCO2() <= 1000) {
    pixels.setPixelColor(0, pixels.Color(0, 255, 0)); // GREEN
  } else if (SCD41.getCO2() > 1000 && SCD41.getCO2() <= 1600) {
    pixels.setPixelColor(0, pixels.Color(130, 60, 0)); // ORANGE
  } else {
    pixels.setPixelColor(0, pixels.Color(255, 0, 0)); // RED
  }
  pixels.show();

  // Send measurements via UART
  Serial.print("Temperature: "); Serial.print(SCD41.getTemperature()); Serial.println(" degC");
  Serial.print("Humidity: "); Serial.print(SCD41.getHumidity()); Serial.println("% rH");
  Serial.print("CO2: "); Serial.print(SCD41.getCO2()); Serial.println(" ppm");

  // Send measurements to TMEP.cz server
  if (WiFi.status() == WL_CONNECTED) {
    HTTPClient http;
    String serverPath = serverName + "GUID=" + GUID + "&temp=" + SCD41.getTemperature() + "&humV=" + SCD41.getHumidity() + "&CO2=" + SCD41.getCO2();

    http.begin(serverPath.c_str());
    int httpResponseCode = http.GET();

    if (httpResponseCode > 0) {
      Serial.print("HTTP answer: ");
      Serial.println(httpResponseCode);
      String payload = http.getString();
      Serial.println(payload);
    } else {
      Serial.print("Error code: ");
      Serial.println(httpResponseCode);
    }
    http.end();
  } else {
    Serial.println("Wi-Fi disconnected");
  }
  delay(60000);
}

The SCD41 sensor can be found at: SOS electronic SCD41.

ESPHome Configuration for Home Assistant

This section provides a sample YAML configuration file for integrating the ESP32-DevKitI2C board with Home Assistant using ESPHome. It configures the ESP32 board, I2C bus, NeoPixel LED, and the SCD4x sensor (CO2, temperature, humidity). It also includes settings for WiFi, API, and OTA updates.

esphome:
  name: esphome-web-b35cb8
  friendly_name: Kitchen CO2 sensor

esp32:
  board: esp32dev
  framework:
    type: arduino

# Configure I2C bus of ESP32
i2c:
  sda: GPIO21
  scl: GPIO22
  scan: true
  id: bus_a

# Configure Neopixel LED
light:
  - platform: neopixelbus
    variant: WS2812
    pin: 2
    num_leds: 1
    flash_transition_length: 100ms
    type: GRB
    id: activity_led
    name: "Neopixel LED"
    restore_mode: ALWAYS_OFF

# Configure SCD4x sensor
sensor:
  - platform: scd4x
    co2:
      name: "CO2 Level"
    temperature:
      name: "Temperature"
    humidity:
      name: "Humidity"

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "***********************************"

# Over-the-Air updates
ota:
  password: "*************************" 

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
  ssid: "Esphome-Web-B35Cb8"
  password: "***************"

captive_portal:

PDF preview unavailable. Download the PDF instead.

User Manual ESP32 Writer LibreOffice 24.2

Related Documents

Preview ESP32-DevKitC V4 Getting Started Guide | Espressif
A comprehensive guide to getting started with the ESP32-DevKitC V4 development board from Espressif. Learn about its features, components, and pinouts for easy interfacing and application development.
Preview Espressif ESP32 Module Firmware Change Notification
Notification regarding the discontinuation of default Espressif Common AT Firmware on ESP32 (4 MB flash) series modules, including affected product names, reasons for change, and impact assessment.
Preview ESP32 WiFi & Bluetooth Development Board: OEM/Integrator Installation Manual
This manual provides essential information for Original Equipment Manufacturers (OEMs) and integrators on installing the ESP32 WiFi & Bluetooth Development Board. It details FCC compliance requirements, installation procedures, and a comprehensive pinout description for the ESP32 module, ensuring proper integration into end products.
Preview Espressif ESP32-S3 Product/Process Change Notice (PCN) - Chip Revision Upgrade
This document details a Product/Process Change Notice (PCN) from Espressif regarding an upgrade to the chip revision for the ESP32-S3 series of products, including chip products, modules, and development boards. It outlines the reason for the change, a description of the update, comparison of changes, impact assessment, and handling procedures.
Preview Espressif ESP32-WROOM-32E WiFi Bluetooth BLE Module User Manual
This user manual provides detailed specifications, pin configurations, functional descriptions, electrical characteristics, antenna performance, and OEM guidance for the Espressif ESP32-WROOM-32E module.
Preview ESP32-S3-BOX-3 AIoT Development Kit User Guide
A comprehensive user guide for the ESP32-S3-BOX-3 AIoT Development Kit, detailing its features, hardware components, setup, and usage for various AI and IoT applications.
Preview Espressif ESP32-WROOM-32E/32UE Datasheet: Wi-Fi & Bluetooth LE Module
Comprehensive datasheet for the Espressif ESP32-WROOM-32E and ESP32-WROOM-32UE modules, detailing features, specifications, pin configurations, electrical characteristics, RF performance, physical dimensions, and handling guidelines for IoT applications.
Preview ESP32-C3 SuperMini IoT Development Board: Features, Setup, and Applications
Comprehensive guide to the Espressif ESP32-C3 SuperMini, a high-performance, low-power IoT development board. Covers product parameters, hardware setup, software configuration with Arduino IDE, WiFi and Bluetooth functionalities, and pin usage.