ESP32 and OLED video kit components

ESP32 + OLED: The Project You Can Finish Today (Video Recap)

If you've ever wanted a screen on a wearable but been put off by the wiring, this one is for you. My video ESP32 OLED Project You Can Finish Today! is built on one promise: you'll have a working OLED by the end of it, no experience needed. Here's the written version, so you can follow along with your board on the bench.

What you need

Four components, if we don't count every individual wire: an ESP32 dev module, a 0.96" OLED (128x64), a breadboard, and some hookup wire. That's it. If you'd rather not hunt for parts, the ESP32 + OLED Video Kit bundles everything I used in the video. Already have a board and just need the screen? The 0.96" white OLED is a good place to start.

The wiring: four wires

The OLED talks over I2C, which means only two signal wires:

  • SDA on the OLED goes to pin D21 on the ESP32
  • SCL on the OLED goes to pin D22
  • VCC goes to 3.3V (red wire)
  • GND goes to any ground pin (black wire)

⚠️Teacher tip, because I've been caught by this myself: modules that look almost identical can have their pins in a different order along the top. Always read the labels printed on your screen rather than trusting the picture in a tutorial.

Setting up the code in PlatformIO

I work in PlatformIO inside VS Code, but the code is the same if you prefer the Arduino IDE. Create a new project, pick the ESP32 Dev Module board with the Arduino framework, and choose a sensible folder. The first setup can take a minute, so make a cup of tea.

You'll add two libraries: the Adafruit SSD1306 library and the Adafruit graphics library. Then, in your code, check just a few things match your screen: the 128x64 resolution, and your SDA/SCL pin definitions. Those defaults are right for most ESP32 dev boards, but it's good practice to define them yourself so you always know what your circuit is doing. Upload, and in under five minutes you should have effects dancing across the screen.

What to build next

Once it works, the fun starts. A few ideas from the video:

  • Live data: stream in temperature or other readings and show them on the screen.
  • Daily inspiration: a morning screen that serves up a random quote.
  • Retro games: a tiny Pong game is a classic. Add a joystick for more challenge.

And if you're stuck for project ideas generally, my video on 9 wearable tech project starters is a good rut-breaker.

The bonus hack: type to your OLED from your phone

The ESP32 has Wi-Fi built in, so you can host a tiny web page. Add the extra code from my GitHub, enter your Wi-Fi name and password, open the address that appears on the OLED, and type a message into the page on your phone. Hit send, and your words appear on the screen. I typed "hello world" and there it was. It's a small thing, but it turns a static display into something interactive, and it's a great base for a name-badge or message necklace.

From breadboard to wearable

A breadboard is for learning. When you're ready to wear it, swap the jumper wires for soft silicone wire, sew your connections, and think about power. The same OLED code carries straight over. For fabric-based inputs like touch buttons, the MPR121 touch sensor pairs nicely with conductive fabric and shares the same I2C bus, so it's a natural next step.

Over to you

I'd love to know how you'd use an OLED in your own project, or whether this is your first time wiring one up. Tell me in the comments on the video, and if you build something, share it. You can also see my newest upload, An ESP32 project you can finish today, for a quick taste. Happy making!

Watch the full video | Get the kit

Stuck? I'm live every Wednesday over on YouTube as CMozMaker 

Retour au blog

Laisser un commentaire