This project is an AI-powered matchbox that captures images using an ESP32-S3, processes them via an AI model, and displays the results on a 1.3” SH1106 OLED screen. It’s one of the smallest AI-powered vision devices, making it portable and easy to integrate into various applications.
This is Part One of the project, where I focus on:✔️ Capturing images using an ESP32-S3 camera module✔️ Processing images with OpenAI’s GPT-4o API✔️ Displaying results on a 1.3” OLED screen✔️ Creating a sleek user interface with animations and borders
How It Works1️⃣ Press the button to capture an image2️⃣ The ESP32-S3 sends the image to OpenAI’s GPT-4o API3️⃣ The AI analyzes the image and returns a one-word result4️⃣ The result is displayed on the OLED screen with a stylish UI5️⃣ The system waits for the next input
Software & Libraries- ESP32 Camera Library (for image capture)
- WiFi & HTTPClient (to send images to API)
- Base64 Encoding (to format image data)
- ArduinoJson (to handle API responses)
- Adafruit GFX & SH110X Libraries (for OLED graphics)
Before integrating AI capabilities, I first ensured that the ESP32-S3 camera module was working correctly. Using the ESP32 Camera example sketch, I tested image capture and confirmed that the OV2640 sensor was functioning as expected. This step was crucial to rule out hardware or wiring issues before moving forward. More more info: https://wiki.seeedstudio.com/xiao_esp32s3_camera_usage/
To enable AI-powered image recognition, I created an OpenAI API token and tested the connection using a simple REST API request. This step verified that the ESP32-S3 could connect to the internet and send data to external servers. A basic API call was made to check connectivity and ensure a successful response from OpenAI’s servers before integrating image data. Learn more about here : https://platform.openai.com/docs/guides/vision
3️⃣ Integrating OpenAI API with the Camera ModuleAfter validating both components separately, I merged the ESP32-S3 camera module with the OpenAI API. This involved capturing an image, encoding it in Base64, and sending it to OpenAI’s GPT-4o model for processing. The AI model was configured to identify objects in a single word, making the response fast and efficient for a compact OLED display.
With the camera and AI pipeline working, I added a 1.3” SH1106 OLED display to show results. Esp32 connected with Pin 8, 9 with oled display. The initial interface displayed system statuses like "Initializing, " "Capturing..., " and "Processing...". Once the API returned a result, it was formatted and displayed in a clear and visually appealing way with a bordered UI.
Additionally, I designed a startup animation that briefly displays “Welcome” and “AI-Powered Matchbox” for a more polished user experience.
To make the project compact and portable, I arranged all the components:✔️ OLED Display was securely mounted in place.✔️ 3.7V Li-ion Battery (Apple Watch Series 9 Battery) was added for portability.✔️ TP4056 Battery Charging Module was included for easy recharging.(Optional)✔️ All connections were properly soldered to ensure durability.
Finally, all the components were carefully fitted inside a real matchbox, making it one of the smallest AI-powered image recognition devices. I ensured that:✅ The button was easily accessible for image capture.✅ The OLED display was perfectly aligned for readability.✅ Ventilation was sufficient to prevent overheating.
The final result? A fully functional AI-powered matchbox capable of recognizing objects in real-time while remaining ultra-compact.
If you love fun, hands-on experiments with AI, electronics, and cutting-edge tech, you’re in the right place! 🚀
🔹 Follow me here on Hackster for more in-depth projects and future updates.🔹 Join me on Instagram (@shortcircuitlab) for fun science & tech content, behind-the-scenes experiments, and cool AI builds! ⚡🔬🔹 Subscribe to my YouTube channel for detailed tutorials, live demos, and exciting maker projects! 🎥💡
Let’s push the boundaries of innovation together and make science & tech more exciting! 🎉 Follow along for more AI-powered creations! 🚀
Comments
Please log in or sign up to comment.