In this project, I brought Google Gemini AI responses on a Mini 128*64OLED display using the Seeed Studio Xiao ESP32-C3. With just a few components, I created a pocket-sized AI terminal that fetches intelligent replies from Gemini and displays them very smoothy with text wrapping, and button-based navigation—no trouble and just direct & clear output.
I built this because I always wanted to build something very simple, intelligent, and embedded —A compact AI interface without relying much on a phone or PC screen. This project is inspired by chat-based AI like Gemini & ChatGPT. So, I decided to make a Pocket AI assistant that communicates only through text, entirely on a microcontroller with a small OLED.
I used simple Hardware which are-Xiao ESP32-C3 (by Seeed Studio) – compact, Wi-Fi enabled board
0.96" I2C OLED Display – 128x64 resolution
2 Push Buttons – for scrolling up and down
Breadboard & Jumpers
USB-C Cable
How I Built It-1. Display Setup & FontsI used the U8g2 library for controlling the OLED display. It allows clean fonts and buffer-based drawing, ideal for simple text displaying and animations.
2. Animations & UII added:
A “Developed By - IoT HUB” splash animation with slow seesaw movement
A blinking “Loading…” animation while fetching answers
Word-wrap that avoids breaking words mid-line
3. Wi-Fi & Gemini APIUsing the ESP32-C3’s Wi-Fi capabilities, I connected my local network and used HTTPClient to query Gemini using its public API.
The responses are parsed using ArduinoJson, and displayed on the screen—3 lines at a time, with vertical scroll using two buttons.
4. User Interaction1) Input questions via Serial Monitor
2) See responses on OLED with clean formatting
3) Scroll up and down using GPIO buttons
How You Can Build It -Wire the OLED to SDA = GPIO6, SCL = GPIO7 on Xiao ESP32-C3
Connect two push buttons to GPIO8 and GPIO9 (with internal pullups)
Flash the provided Arduino code with your API and WiFi SSID with Password
Enter a question in the Serial Monitor and get the AI response directly on your display
Use the buttons to scroll through longer answers
Libraries used
- U8g2 for OLED
- WiFi & HTTPClient for network communication
- ArduinoJson for parsing Gemini’s JSON response
- Add voice-to-text input using a microphone module
- Save answer history on SD card using SD card module
- Add menu and other multitasking features
Comments