GPT-4o on an ESP32 MicroController

date
May 15, 2024
type
Post
year
slug
gpt4o-microcontroller
status
Published
tags
AI
GPT
OpenAI
Microcontroller
ESP32
Research
summary
A guide for how to use OpenAI’s GPT-4o model on a microcontroller
After I got GPT-4o to run in Unity, I wanted to try and see if I could get it to talk to an ESP32 microcontroller!
After I got GPT-4o to run in Unity, I wanted to try and see if I could get it to talk to an ESP32 microcontroller!
I wrote the code in VSCode+PlatformIO, but it should work the same in the Arduino IDE.
notion imagenotion image
  • Connect an ESP32 microcontroller, create a new project, set it all up
  • Install the ArduinoJson library
  • create config.h
  • create main.cpp (or whatever.ino if you’re using the Arduino IDE)
  • Upload and run! First it connects to the WiFi, then it sends one request and prints the response to serial (Open the Serial Monitor to see it!)
    • notion imagenotion image
Done! GPT-4o on an ESP32! Now what to do with this power… 🤔
Done! GPT-4o on an ESP32! Now what to do with this power… 🤔
 
Here’s a picture of a TTGO LoRa32-OLED V1 with GPT-response on screen:
Why did the modular synthesizer go to therapy? - We’ll never know, because the answer didn’t fit onto the tiny screen…Why did the modular synthesizer go to therapy? - We’ll never know, because the answer didn’t fit onto the tiny screen…
Why did the modular synthesizer go to therapy? - We’ll never know, because the answer didn’t fit onto the tiny screen…

Leave a comment