Raspberry Pi Component Search

Find rpi
I’ll look for “rpi” across available project/library context and report the most relevant Raspberry Pi-related matches.
Found Raspberry Pi / RPi parts in the library. Top matches:
  1. Raspberry Pi Compute Module 4 — 200 terminals
  2. Raspberry Pi Compute Module 5 — 200 terminals, datasheet available
  3. Raspberry Pi Pico — 40 terminals, MPN SC0915
  4. Raspberry Pi 2/3/4/5 Model B header/outline — 40-pin HAT-style connector
  5. Pin Socket 02x20 for RPi 5 — 40-pin through-hole socket
Search URL: rpi Raspberry Pi
Add Pi Pico
CM4 footprint
Find HAT header
Compare Pi options
ESP1
J1
U3 BST - C6 P2
J1 VBUS__1 - D2 C
C11 P1 - R9 P2
ESP1 IO5 - U4 SCL
U3 SW - L1 P1
ESP1 IO8 - R13 P2
L1 P2 - U3 FB
ESP1 IO9 - SW2 1
R3 P2 - R4 P1
IC1 ITIMER_2 - C4 P1
J1 DN1 - J1 DN2
J1 VBUS__1 - D2 C
ESP1 IO6 - R14 P1
J1 CC1 - R1 P1
L1 P2 - U3 FB
IC1 PGTH_1 - IC1 PGTH_2
J1 DP1 - J1 DP2
IC1 OUT - C2 P1
IC1 PGTH_1 - IC1 PGTH_2
J1 VBUS__1 - D2 C
L1 P2 - U3 FB
IC1 ILM - R5 P1
IC1 DVDT_1 - IC1 DVDT_2
L1 P2 - U3 FB
J1 CC1 - R1 P1
U3 BST - C6 P2
IC1 DVDT_1 - IC1 DVDT_2
IC1 OUT - C2 P1
R3 P2 - R4 P1
ESP1 IO9 - SW2 1
L1 P2 - U3 FB
ESP1 IO4 - U4 SDA
C11 P1 - R9 P2
IC1 OUT - C2 P1
IC1 PGTH_1 - IC1 PGTH_2
L1 P2 - U3 FB
IC1 PG - R8 P1
L1 P2 - U3 FB
IC1 PG - R8 P1
U3 SW - L1 P1
J1 CC2 - R2 P1
J1 DN1 - J1 DN2
J1 DN1 - J1 DN2
IC1 PG - R8 P1
J1 VBUS__1 - D2 C
IC1 PGTH_1 - IC1 PGTH_2
ESP1 IO2 - R12 P2
IC1 ILM - R5 P1
C11 P1 - R9 P2
J1 DP1 - J1 DP2
R14 P2 - D3 A
J1 DP1 - J1 DP2
J1 DN1 - J1 DN2
ESP1 IO6 - R14 P1
L1 P2 - U3 FB
ESP1 IO5 - U4 SCL
L1 P2 - U3 FB
R14 P2 - D3 A
R3 P2 - R4 P1
IC1 OUT - C2 P1
L1 P2 - U3 FB
J1 CC2 - R2 P1
J1 VBUS__1 - D2 C
C11 P1 - R9 P2
ESP1 IO8 - R13 P2
ESP1 IO4 - U4 SDA
R3 P2 - R4 P1
L1 P2 - U3 FB
IC1 DVDT_1 - IC1 DVDT_2
J1 DP1 - J1 DP2
IC1 OUT - C2 P1
ESP1 IO2 - R12 P2
ESP1 IO4 - U4 SDA
L1 P2 - U3 FB
L1 P2 - U3 FB
J1 VBUS__1 - D2 C
ESP1 IO5 - U4 SCL
L1 P2 - U3 FB
L1 P2 - U3 FB
IC1 ITIMER_2 - C4 P1
U3 SW - L1 P1
L1
Inductance
0.0000039 H
R5
Resistance
953 Ω
C1
Capacitance
0.000001 F
R14
Resistance
680 Ω
R1
Resistance
5100 Ω
C8
Capacitance
0.000022 F
R6
Resistance
100000 Ω
R12
Resistance
10000 Ω
C7
Capacitance
0.000022 F
R4
Resistance
205000 Ω
C4
Capacitance
2.2e-9 F
R13
Resistance
10000 Ω
C2
Capacitance
0.00001 F
C10
Capacitance
1e-7 F
C12
Capacitance
1e-7 F
C6
Capacitance
1e-7 F
R3
Resistance
470000 Ω
C5
Capacitance
0.00001 F
R9
Resistance
10000 Ω
C9
Capacitance
0.00001 F
R11
Resistance
4700 Ω
R2
Resistance
5100 Ω
R10
Resistance
4700 Ω
C3
Capacitance
1e-9 F
C11
Capacitance
0.000001 F
R7
Resistance
36500 Ω
R8
Resistance
10000 Ω
ESP1 GND - U4 VSS
GND
ESP1 GND - ESP1 GND
U4
GND
ESP1 GND - ESP1 GND
U3
GND
GND
GND
GND
D3
C5 P2 - C7 P2
ESP1 GND - ESP1 GND
C5 P2 - C7 P2
ESP1 GND - ESP1 GND
C5 P2 - C7 P2
ESP1 GND - ESP1 GND
GND
R4 P2 - R5 P2
R4 P2 - R5 P2
ESP1 GND - U4 VSS
GND
ESP1 GND - U4 VSS
C5 P2 - C7 P2
R4 P2 - R5 P2
C5 P2 - C7 P2
GND
D2
R4 P2 - R5 P2
ESP1 GND - ESP1 GND
ESP1 GND - ESP1 GND
C5 P2 - C7 P2
GND
R4 P2 - R5 P2
ESP1 GND - U4 VSS
GND
C5 P2 - C7 P2
ESP1 GND - ESP1 GND
R4 P2 - R5 P2
C5 P2 - C7 P2
GND
GND
R4 P2 - R5 P2
ESP1 GND - ESP1 GND
D1
SW1
SW2
IC1

Refine this doc
Ask about this doc
Firmware Starter — ESP32-C3-WROOM-02-N4 Environmental Sensor Node
Platform & Toolchain
  • MCU/module: ESP32-C3-WROOM-02-N4 (ESP1)
  • Framework: Arduino on PlatformIO
  • USB programming/debug: ESP32-C3 native USB Serial/JTAG on GPIO18/GPIO19
  • Sensor: SHT41-AD1B-R2 (U4) at I2C 7-bit address 0x44
Pin Mapping

Table


FunctionESP32-C3 pinSchematic netConnected toDirectionNotes
I2C SDAGPIO4I2C_SDAU4:SDA, R10bidirectional4.7 kΩ pull-up to 3V3
I2C SCLGPIO5I2C_SCLU4:SCL, R11output4.7 kΩ pull-up to 3V3
Status LEDGPIO6STATUS_LEDR14 -> D3outputActive high
eFuse power goodGPIO10EFUSE_PGIC1:PG, R8inputPull-up to 3V3
USB D-GPIO18USB_DNJ1 DN pins via D1USBNative USB Serial/JTAG
USB D+GPIO19USB_DPJ1 DP pins via D1USBNative USB Serial/JTAG
BOOT buttonGPIO9ESP_BOOTSW2 to GNDinput/strapHold BOOT while resetting to enter download mode
Reset/enableENESP_ENSW1, R9, C11resetSW1 pulls EN low
Dependencies & Project Setup
Create a PlatformIO project with this platformio.ini:

Ini


[env:esp32-c3-devkitm-1]
platform = espressif32
board = esp32-c3-devkitm-1
framework = arduino
monitor_speed = 115200
upload_speed = 921600
build_flags =
    -D ARDUINO_USB_MODE=1
    -D ARDUINO_USB_CDC_ON_BOOT=1
lib_deps =
    h2zero/NimBLE-Arduino@^1.4.3
Complete Firmware Source
Save as src/main.cpp:

Cpp


#include <Arduino.h>
#include <Wire.h>
#include <WiFi.h>
#include <HTTPClient.h>
#include <NimBLEDevice.h>

// Pin definitions from schematic
#define I2C_SDA_PIN        4   // ESP1:IO4 -> I2C_SDA -> U4:SDA
#define I2C_SCL_PIN        5   // ESP1:IO5 -> I2C_SCL -> U4:SCL
#define STATUS_LED_PIN     6   // ESP1:IO6 -> R14 -> D3
#define EFUSE_PG_PIN      10   // ESP1:IO10 -> IC1:PG
#define BOOT_BUTTON_PIN    9   // ESP1:IO9 -> SW2 to GND

// SHT41 constants
#define SHT41_ADDR             0x44
#define SHT41_CMD_MEASURE_HIGH 0xFD
#define SHT41_CMD_SOFT_RESET   0x94
#define SENSOR_INTERVAL_MS     5000

// WiFi reporting placeholders
const char* WIFI_SSID     = "YOUR_WIFI_SSID";
const char* WIFI_PASSWORD = "YOUR_WIFI_PASSWORD";
const char* HTTP_ENDPOINT = "http://example.local/env";

// BLE Environmental Sensing Service UUIDs
static NimBLECharacteristic* tempCharacteristic = nullptr;
static NimBLECharacteristic* rhCharacteristic = nullptr;

unsigned long lastSensorReadMs = 0;

uint8_t crc8_sht4x(const uint8_t* data, uint8_t len) {
    uint8_t crc = 0xFF;
    for (uint8_t i = 0; i < len; i++) {
        crc ^= data[i];
        for (uint8_t bit = 0; bit < 8; bit++) {
            crc = (crc & 0x80) ? (uint8_t)((crc << 1) ^ 0x31) : (uint8_t)(crc << 1);
        }
    }
    return crc;
}

bool sht41SoftReset() {
    Wire.beginTransmission(SHT41_ADDR);
    Wire.write(SHT41_CMD_SOFT_RESET);
    if (Wire.endTransmission() != 0) return false;
    delay(2);
    return true;
}

bool readSHT41(float& temperatureC, float& humidityRH) {
    Wire.beginTransmission(SHT41_ADDR);
    Wire.write(SHT41_CMD_MEASURE_HIGH);
    if (Wire.endTransmission() != 0) return false;

    delay(10); // high precision measurement max is about 8.3 ms

    uint8_t rx[6] = {0};
    if (Wire.requestFrom(SHT41_ADDR, 6) != 6) return false;
    for (uint8_t i = 0; i < 6; i++) rx[i] = Wire.read();

    if (crc8_sht4x(&rx[0], 2) != rx[2]) return false;
    if (crc8_sht4x(&rx[3], 2) != rx[5]) return false;

    uint16_t t_ticks  = ((uint16_t)rx[0] << 8) | rx[1];
    uint16_t rh_ticks = ((uint16_t)rx[3] << 8) | rx[4];

    temperatureC = -45.0f + 175.0f * ((float)t_ticks / 65535.0f);
    humidityRH = -6.0f + 125.0f * ((float)rh_ticks / 65535.0f);
    if (humidityRH > 100.0f) humidityRH = 100.0f;
    if (humidityRH < 0.0f) humidityRH = 0.0f;
    return true;
}

void initWiFi() {
    WiFi.mode(WIFI_STA);
    WiFi.begin(WIFI_SSID, WIFI_PASSWORD);

    Serial.print("Connecting to WiFi");
    uint8_t retries = 0;
    while (WiFi.status() != WL_CONNECTED && retries < 20) {
        digitalWrite(STATUS_LED_PIN, !digitalRead(STATUS_LED_PIN));
        delay(250);
        Serial.print('.');
        retries++;
    }

    if (WiFi.status() == WL_CONNECTED) {
        digitalWrite(STATUS_LED_PIN, HIGH);
        Serial.printf("\nWiFi connected, IP: %s\n", WiFi.localIP().toString().c_str());
    } else {
        digitalWrite(STATUS_LED_PIN, LOW);
        Serial.println("\nWiFi not connected; BLE and serial reporting remain active.");
    }
}

void reportHttp(float temperatureC, float humidityRH) {
    if (WiFi.status() != WL_CONNECTED) return;

    HTTPClient http;
    if (!http.begin(HTTP_ENDPOINT)) return;
    http.addHeader("Content-Type", "application/json");

    String payload = "{\"temperature_c\":" + String(temperatureC, 2) +
                     ",\"humidity_rh\":" + String(humidityRH, 2) +
                     ",\"efuse_pg\":" + String(digitalRead(EFUSE_PG_PIN)) + "}";

    int status = http.POST(payload);
    Serial.printf("HTTP POST status: %d\n", status);
    http.end();
}

void initBLE() {
    NimBLEDevice::init("EnvNode-C3");
    NimBLEServer* server = NimBLEDevice::createServer();
    NimBLEService* service = server->createService("181A"); // Environmental Sensing

    tempCharacteristic = service->createCharacteristic(
        "2A6E", NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::NOTIFY); // Temperature
    rhCharacteristic = service->createCharacteristic(
        "2A6F", NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::NOTIFY); // Humidity

    int16_t zeroTemp = 0;
    uint16_t zeroRh = 0;
    tempCharacteristic->setValue((uint8_t*)&zeroTemp, sizeof(zeroTemp));
    rhCharacteristic->setValue((uint8_t*)&zeroRh, sizeof(zeroRh));

    service->start();
    NimBLEAdvertising* adv = NimBLEDevice::getAdvertising();
    adv->addServiceUUID("181A");
    adv->setScanResponse(true);
    adv->start();
    Serial.println("BLE Environmental Sensing service started.");
}

void reportBLE(float temperatureC, float humidityRH) {
    // BLE Environmental Sensing spec uses sint16 temperature in 0.01 C and uint16 humidity in 0.01 %RH.
    int16_t tempBle = (int16_t)roundf(temperatureC * 100.0f);
    uint16_t rhBle = (uint16_t)roundf(humidityRH * 100.0f);

    tempCharacteristic->setValue((uint8_t*)&tempBle, sizeof(tempBle));
    tempCharacteristic->notify();
    rhCharacteristic->setValue((uint8_t*)&rhBle, sizeof(rhBle));
    rhCharacteristic->notify();
}

void setup() {
    pinMode(STATUS_LED_PIN, OUTPUT);
    pinMode(EFUSE_PG_PIN, INPUT);
    pinMode(BOOT_BUTTON_PIN, INPUT_PULLUP);
    digitalWrite(STATUS_LED_PIN, LOW);

    Serial.begin(115200);
    delay(500);
    Serial.println("ESP32-C3 environmental node firmware starting.");

    Wire.begin(I2C_SDA_PIN, I2C_SCL_PIN, 400000);
    if (!sht41SoftReset()) {
        Serial.println("SHT41 soft reset failed; check I2C wiring and pull-ups.");
    }

    initBLE();
    initWiFi();

    Serial.printf("eFuse PG: %s\n", digitalRead(EFUSE_PG_PIN) ? "GOOD" : "NOT GOOD");
}

void loop() {
    const unsigned long now = millis();

    if (now - lastSensorReadMs >= SENSOR_INTERVAL_MS) {
        lastSensorReadMs = now;

        float temperatureC = NAN;
        float humidityRH = NAN;
        if (readSHT41(temperatureC, humidityRH)) {
            Serial.printf("T=%.2f C, RH=%.2f %%, eFusePG=%d\n",
                          temperatureC, humidityRH, digitalRead(EFUSE_PG_PIN));
            digitalWrite(STATUS_LED_PIN, HIGH);
            reportBLE(temperatureC, humidityRH);
            reportHttp(temperatureC, humidityRH);
        } else {
            Serial.println("SHT41 read failed.");
            digitalWrite(STATUS_LED_PIN, LOW);
        }
    }

    if (WiFi.status() != WL_CONNECTED) {
        static unsigned long lastReconnect = 0;
        if (millis() - lastReconnect > 30000) {
            lastReconnect = millis();
            initWiFi();
        }
    }

    delay(10);
}
Build & Flash Instructions
  1. Install PlatformIO.
  2. Connect USB-C to J1.
  3. Build: pio run
  4. Upload: pio run -t upload
  5. Monitor: pio device monitor
If automatic USB upload does not enter the bootloader, hold SW2 BOOT, tap SW1 RESET, release RESET, then release BOOT and retry upload.
  • Platform & Toolchain

  • Pin Mapping

  • Dependencies & Project Setup

  • Complete Firmware Source

  • Build & Flash Instructions

USB-C WiFi BLE Environmental Sensor Node thumbnail
Low-power USB-C environmental sensor node with ESP32 Wi-Fi/BLE, digital temperature/humidity sensing, and protected 5 V input power path.

Properties

Properties describe core aspects of the project.

Pricing & Availability

Distributor

Qty 1

Arrow

$2.47–$3.79

Digi-Key

$2.88–$4.15

HQonline

$7.11–$7.29

LCSC

$8.77–$9.01

Mouser

$10.52

TME

$2.52

Verical

$3.39–$4.26

Controls