Module 2 • Jarvis Voice AI ESP32-S3 Super-Kit Zero-Library C++

Session 8: Jarvis Talking Voice AI Companion Bot

Native ESP_I2S.h digital audio: 24-bit I2S microphone + 3W MAX98357A speaker for robotic chimes & voice.

← Course Book 🏫 Satpuda Lab
Connect Robo Logo Connect Robo Kit

⚡ 4-Step Visual System Flow

No Text Walls • 1-Glance Architecture
Step 1 🎤
INMP441 Digital Mic
24-bit I2S Soundwave

High-fidelity digital microphone captures ambient voice & claps.

Step 2 🧠
ESP_I2S DMA Engine
Direct Memory Access

Transfers 44.1kHz audio buffers in hardware with 0% CPU lag.

Step 3 ⚡
Clap & Volume Filter
Acoustic Threshold

Identifies sharp clap transients and double-tap acoustic triggers.

Step 4 🔊
MAX98357A 3W Speaker
Class-D I2S Amplifier

Speaks synthesized voice greetings & high-fidelity tones!

1

🧰 Dual I2S Audio Hardware & Pinout

ESP32-S3
ESP32-S3 Dual I2S Ports
INMP441 Mic
INMP441 Mic Digital I2S Input
MAX98357A Amp
MAX98357A Amp 3W I2S Output
Jarvis Companion
Jarvis Companion Clap & Voice AI
Microphone VCC
Red Jumper Wire to 3.3V Power Rail
3.3V Power
Speaker Amplifier VCC
Red Jumper Wire to 5V / VIN Power Rail
5V / VIN
Common Ground (GND)
Black Jumper connecting Mic GND, Amp GND, and ESP32
GND
I2S BCLK (Bit Clock)
Yellow Jumper Wire for I2S Serial Clock
GPIO 14
I2S LRCK (Left/Right Select)
Green Jumper Wire for Word Select Clock
GPIO 15
I2S SDIN (Mic Serial Data)
Blue Jumper Wire from INMP441 SD to ESP32
GPIO 16
I2S SDOUT (Amp Audio Out)
Orange Jumper Wire from ESP32 to MAX98357A DIN
GPIO 17
MAX98357A VIN (5V Power)
Red Jumper Wire to 5V / VIN Rail
5V / VIN
MAX98357A GND (Ground)
Black Jumper Wire to Common Ground
GND
MAX98357A BCLK (Bit Clock)
Yellow Jumper Wire from ESP32 to Amp BCLK
GPIO 14
MAX98357A LRC (Left/Right Select)
Green Jumper Wire from ESP32 to Amp LRC
GPIO 15
MAX98357A DIN (Audio Data In)
Orange Jumper Wire from ESP32 to Amp DIN
GPIO 17
2

🎤 Live Clap Wake-Up & Voice Response Simulator

(Plays Web Audio Chime + Robotic Voice Reply!)
🟢 Listening on I2S Pin 12
Mic Amplitude: 90 / 180 — Listening Calmly...
0 (Silence) Threshold: 180 (Wake Trigger) 360 (Loud Clap)
3

⚡ Native ESP_I2S.h Verified Codes (Zero External Libraries!)

step1_speaker_chime.ino ESP32-S3 49 lines
/*
 * Session 8 - Step 1: MAX98357A Digital I2S 3W Speaker — Jarvis Boot Chime (Zero Extra Libs!)
 * Wiring: BCLK -> GPIO 15 | LRC -> GPIO 16 | DIN -> GPIO 17 | VIN -> 5V | GND -> GND
 */
#include <ESP_I2S.h>
#include <math.h>

#define I2S_BCLK 15
Preview (8 of 49 lines) — Click ⚡ Open in IDE to auto-load code & board!
✅ Output: Plays crisp 4-note Jarvis boot-up melody on 3W speaker + Cyan RGB!
step2_mic_clap_meter.ino ESP32-S3 42 lines
/*
 * Session 8 - Step 2: INMP441 Digital I2S Microphone — Live Sound & Clap Meter
 * Wiring: SCK -> GPIO 41 | WS -> GPIO 42 | SD -> GPIO 2 | L/R -> GND | VDD -> 3.3V | GND -> GND
 */
#include <ESP_I2S.h>

#define MIC_SCK 41
#define MIC_WS  42
Preview (8 of 42 lines) — Click ⚡ Open in IDE to auto-load code & board!
✅ Output: Plots real-time sound waveform on Serial Plotter + flashes RGB on clap!
step3_jarvis_clap_bot.ino ESP32-S3 59 lines
/*
 * Session 8 - Final Project: Jarvis Voice/Clap Reactive Companion (INMP441 + MAX98357A)
 * Clap near the robot -> Jarvis wakes up, glows Cyan, and replies with a musical chime!
 */
#include <ESP_I2S.h>
#include <math.h>

#define MIC_SCK  41
Preview (8 of 59 lines) — Click ⚡ Open in IDE to auto-load code & board!
✅ Output: Clap near robot ➔ wakes up, glows Cyan-Green & replies with sci-fi chime!
📥 33 Sketches (.ZIP) ← Session 7: OLED Robot Eyes 🛸 Start Module 3: Session 9 Drone Motors →