AI on the Edge LESSON 46: Ultimate Dazzleing Running Rainbow On a NeoPixel Ring

In this lesson we create one of the most beautiful and satisfying NeoPixel effects — a smooth, continuous, running rainbow on a 12-LED ring. We affectionately have named this pattern the “Runbow”. This is the “ultimate” version because it is both visually stunning and highly educational, as we explore two fundamentally different programming approaches the Runbow.
The first method is the most intuitive: we place a fixed rainbow across the ring (each LED gets a different hue equally spaced around the color wheel) and then simply rotate the entire pattern one position at a time. This approach is easy to understand because it mimics physically moving a colorful wheel. We save the color of the first pixel, shift all the other pixels one place, and then place the saved color at the end. It feels like a conveyor belt of color circling around the ring.
The second method is more elegant and mathematically pure. Instead of storing and shifting colors, we recalculate the color of every LED on every frame using a moving offset. For each LED we compute its hue as (i / LED_COUNT + offset) % 1.0, where i is the LED’s position and offset is a value that slowly increases over time. This creates a perfectly smooth rainbow that flows around the ring without ever shifting raw RGB values. Because we regenerate the pattern fresh each cycle, there is no risk of color corruption or accumulated errors.
Both techniques produce a gorgeous running rainbow, but they teach very different programming mindsets. The first method helps you deeply understand array manipulation and data movement. The second method introduces the powerful concept of using mathematics and offsets to create motion — a technique used frequently in advanced LED animations, games, and visual effects. In the end, the offset method tends to look smoother and is easier to extend with additional effects (such as brightness pulsing), but both approaches are valuable skills for any embedded AI or IoT developer working with addressable LEDs.You can adjust the speed of the rainbow by changing how much you increment the offset each loop or by modifying the delay. Once you master these two methods, you will be able to create almost any animated pattern you can imagine on your NeoPixel ring. Lets get this party started!
Here is the code we developed in this video:

This is the schematic we are using to connect the NeoPixel ring:

NeoPixel
NeoPixel Schematic

AI on the Edge LESSON 45: Adding a NeoPixel Ring To Your Raspberry Pi Project

In Lesson 45 of our AI on the Edge series, we take our Fusion AI Lab Kit to the next level by adding a 12-pixel NeoPixel ring. This lesson bridges the gap between pure AI processing and vibrant physical output, showing how your edge AI projects can communicate visually with the real world in a beautiful and engaging way.
We begin by setting up the NeoPixel ring using the SPI interface on the SunFounder Fusion Hat. After importing the necessary libraries (time, board, neopixel_spi, colorsys, and math), we create a simple and reusable hsv2rgb() function that converts Hue values (0.0 to 1.0) into RGB colors that the NeoPixels can understand. This function becomes the foundation for smooth rainbow effects later in the lesson.The lesson starts with basic pixel control. We manually light up each of the 12 pixels one at a time using different colors (red, green, blue, cyan, magenta, yellow, etc.). This slow, deliberate approach lets you clearly see how individual pixel addressing works and helps students understand the coordinate system of the ring.Next, we explore full-ring control by making the entire ring blink between bright red and blue. We then move into motion with a running green pixel moving across a red background — a great introduction to animation techniques. This is followed by a more advanced chasing effect where a blue pixel chases a green pixel around a dim red background.One of the highlights of this lesson is the gentle pulsating aqua effect. Using a sine wave (math.sin), we create a smooth breathing/pulsing animation where the brightness of the color rises and falls naturally. This technique produces a very professional and visually pleasing result that students can easily adapt for future projects.
Finally, we create a rainbow effect. First, we display a uniform rainbow where all 12 pixels show the same color that cycles smoothly through the entire spectrum.
We finish the lesson by assigning the homework. The homework is for you to create the classic running rainbow (what I like to call a “Runbow”), where the colors flow continuously around the ring — one of the most popular and impressive NeoPixel animations.
This lesson reinforces important programming concepts including loops, functions, color theory (HSV vs RGB), timing control, and animation techniques, while giving students an exciting visual payoff. The skills learned here open the door to creating stunning visual feedback for future AI projects — whether it’s status indicators, emotional displays, or attention-grabbing outputs from your edge AI models.

In this class we are using this as our standard components. You should already have the core circuit built and should already have the OLED connected. Today you will add the NeoPixel array.

Our core circuit is:

Fusion Hat Circuit Diagram
This is the circuit we will use moving forward in the class

Last week we also added the SSD1306 OLED Display.

OLED
SSD1306 OLED Connected to the Fusion AI Hat

And finally today we add the NeoPixel ring from the Fusion AI Lab Kit.

NeoPixel
NeoPixel Schematic

AI on the Edge LESSON 44: Displaying Live MediaPipe FaceMesh Avatar on SSD1306 OLED in OpenCV

This is Getting Crazy Cool!

Hey guys, welcome back to the Fusion AI Lab series, AI on the Edge! In Lesson 44 we just took things up another notch. We’re now running MediaPipe Face Mesh on our Raspberry Pi 5, pulling all 468 facial landmarks in real time, and then drawing a clean, smooth face contour directly onto a tiny 128×64 OLED display!

That’s right — your face is now living on that little monochrome OLED in real time! Every eyebrow raise, smile, head tilt, and eye movement gets faithfully reproduced on the display. We’re pulling the camera feed with picamera2, processing it with MediaPipe’s powerful face mesh, scaling the landmarks down to OLED resolution, and then drawing the official FACEMESH_CONTOURS connections using PIL. The result is surprisingly smooth and fun to watch! This project really shows the power of combining modern AI vision tools with simple embedded hardware. Watching your own face rendered in real time on a tiny OLED is just plain awesome — it feels like sci-fi stuff from just a few years ago, and now we’re doing it on the Edge with our Fusion AI Lab kit!

If you’ve been following along, you’re starting to see how powerful these tools are becoming. We’re no longer just detecting faces — we’re understanding the structure of the face and visualizing it however we want. And we’re just getting started!

So fire up your Raspberry Pi, grab that OLED, and let’s keep pushing the limits. You’re doing some seriously cool stuff!

In this lesson we are still using our standard Fusion AI Lab Kit cirtuit from the earlier lessons:

Fusion Hat Circuit Diagram
This is the circuit we will use moving forward in the class

We have also connected the OLED to the above circuit according to this diagram:

OLED
SSD1306 OLED Connected to the Fusion AI Hat

AI on the Edge LESSON 43: Adding SSD1306 OLED to Your Raspberry Pi Projects

In today’s lesson in the AI on the Edge series, we’re adding a very important piece to our growing collection of skills — learning how to use the SSD1306 OLED display with the SunFounder Fusion AI Lab kit.

One of the key goals of this class is to build intelligent systems that can run completely on the edge — without needing to rely on the cloud. A big part of that is giving our edge devices the ability to communicate clearly with us. That’s exactly where the little SSD1306 OLED really shines. Whether you’re building a smart robot, an autonomous sensor node, or an AI-powered monitoring system, having a crisp, low-power display to show status, results, or even fun animations makes your project feel complete and professional.

In this video, we start with the basics and gradually build up. You’ll learn how to connect the OLED using I2C, initialize it with CircuitPython, and then use the PIL library to create images in memory before sending them to the screen. We explore loading different font sizes so you can create nice, readable layouts. Then we move into drawing shapes — rectangles, circles, and borders — before finishing with a fun bouncing ball animation that brings the whole thing to life.

This lesson is particularly important in our AI on the Edge journey because the SSD1306 is extremely lightweight and uses almost no processing power, making it perfect for running alongside face detection, object tracking, speech recognition, and other AI tasks without slowing down your Raspberry Pi. You’ll see how easy it is to display messages like detection results, confidence scores, system status, or even playful personality messages from your AI creations.

By the end of this lesson, you’ll have the confidence to add a real display to any project in this class. Whether you want to show live face tracking data, sensor readings, or just give your robot a fun way to “talk” to the world, the skills you learn here will be used again and again in future projects.

So if you’re following along with the AI on the Edge series, this is another big step forward. Grab your Fusion AI Hat, open up Thonny, and let’s get that OLED screen lighting up with some personality!

As always, I strongly encourage you to take the code and make it your own. Change the messages, create new animations, and think about how you can use this display in your own AI projects. That’s where the real learning and creativity happens

So far in this class we have been using this schematic:

Fusion Hat Circuit Diagram
This is the circuit we will use moving forward in the class

In this lesson, we will be adding the SSD1306 OLED display. Keep the schatic above, but now add the OLED display to the breadboard. It should be connected to the Fusion Hat as follows:

  1. Connect the VCC pin of OLED display to 3.3V on Fusion HAT+
  2. Connect the GND pin of OLED display to GND on Fusion HAT+
  3. Connect the SCL pin of OLED display to SCL (GPIO 3) on Fusion HAT+
  4. Connect the SDA pin of OLED display to SDA (GPIO 2) on Fusion HAT+
OLED
SSD1306 OLED Connected to the Fusion AI Hat

While we are updating our project components, go ahead and connect the neoPixel ring to yout Fusion Hat. Here is the schematic to add the neopixel ring, and we will be using it in future lessons.

NeoPixel
NeoPixel Schematic

In the video, we developed the following code to show you how to put the SSD1306 OLED through its paces using the Fusion AI Hat on the Raspberry Pi 5.

 

AI on the Edge LESSON 42: Create Composite Images Using Masks in OpenCV and MediaPipe

In this exciting project, we combine a Raspberry Pi 5, the Fusion AI Lab Kit, a Pi Camera, and a remote IP camera to generate a stunning real-time composite video. Watch as a glowing, translucent MediaPipe face mesh of my face hovers magically over live video of the Mighty River Nice scenery captured by an IP camera. The effect looks futuristic and professional — perfect for creative video effects, interactive installations, or just blowing your mind with computer vision! Using Picamera2 for high-frame-rate local capture and OpenCV with an RTSP stream from the river camera, we process everything in real time. MediaPipe’s Face Mesh detects and tracks facial landmarks, which we draw as beautiful cyan/teal contours with glowing irises. Then we create a clean mask, separate the mesh foreground from the river background, and blend them seamlessly into one composite frame. You’ll see every debugging layer live on screen too — meshLayer, mask, inverted mask, riverBG, and meshFG — so you can understand exactly how the magic happens.This tutorial is beginner-to-intermediate friendly and packed with practical OpenCV + MediaPipe techniques you can adapt for your own augmented reality projects. Whether you’re a longtime follower of the Paul McWhorter channel or new to the Fusion AI Kit, you’ll walk away inspired and ready to build your own hovering effects, overlays, or interactive displays.Grab the full code from the video description, fire up your Pi 5, and start creating jaw-dropping computer vision projects today. Drop a comment and let me know what you’d like to overlay next — another face mesh, hand tracking, or something completely different? Let’s keep pushing the limits of what we can do with affordable AI hardware!

 

Making The World a Better Place One High Tech Project at a Time. Enjoy!