Tag Archives: AI

AI on the Edge LESSON 7: Homework Solution for Dimmable LED

In Lesson 6, I gave you a homework challenge: build a dimmable LED using a potentiometer. In today’s Lesson 7, we go through the solution together step-by-step.

This lesson is all about taking analog input from a potentiometer and converting it into smooth PWM output to control the brightness of an LED. It’s a very practical project because it teaches you how to read real-world analog values and turn them into useful control signals — skills we’ll use again and again as we build smarter AI-powered projects.

In the video, I walk you through the complete working code. You’ll see how we read the potentiometer value (0 to 4095), convert that raw number into a proper brightness percentage using a bit of math (with a nice logarithmic curve so the brightness feels natural to the human eye), and then send that value to the LED using PWM. The result is a very smooth, responsive dimmer that feels professional.

Even though this seems like a simple project, it’s actually an important stepping stone. Understanding how to read sensors and smoothly control outputs is fundamental to building real AI on the Edge systems — whether you’re controlling motors, adjusting screen brightness, or varying the speed of a robot based on sensor input.

By the end of this lesson, you should have a solid understanding of how to combine the ADC (Analog to Digital Converter) with PWM output, and more importantly, how to think about mapping real-world inputs to useful outputs.

So if you did the homework, great job! If you got stuck, don’t worry — we go through the full solution together. And as always, I strongly encourage you to take the code and make it your own. Try changing the response curve, add multiple LEDs with different colors, or combine it with things we’ve learned in earlier lessons.

This is the kind of foundational hardware skill that will serve you well as we continue moving deeper into the AI on the Edge class. You’re doing great — keep going!

We are still using the schematic from our earlier project.

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

In this lesson, this is the code which we came up with:

 

AI on the Edge LESSON 3: Learn Python Essentials In One Session

Hey everyone, and welcome back to the AI on the Edge series!

In today’s lesson, we’re doing something really important. Since this entire class is going to be taught using Python, I wanted to make sure everyone — even complete beginners — has a solid foundation before we start attaching hardware and diving into real AI projects.

In this marathon session, I take you through all the Python essentials you’ll need for the rest of the class. We cover variables, data types, if statements, for loops, while loops, lists, getting user input, and how to organize your code in a clean, readable way. I even share my personal philosophy on keeping code simple (you’ll notice I avoid nested else statements like the plague because I like my logic clean and easy to follow).

This lesson is designed to be a complete “Python boot camp” in one video. Even if you’ve never written a line of code before, by the end of this lesson you’ll have the core skills needed to keep up with everything we’re going to build in this series. And if you’re already comfortable with Python, this is still a great refresher with my specific style and approach that we’ll be using throughout the class.

I really believe that strong programming fundamentals are the key to success in AI on the Edge. Once you’re comfortable with these basics, we can focus on the fun stuff — controlling hardware, reading sensors, processing camera images, using voice commands, and building intelligent systems.

So whether you’re brand new to programming or just need a solid review, grab a cup of coffee, settle in, and let’s spend some quality time getting you up to speed with Python. I encourage you to code along with me in the video and actually type every example. That hands-on practice is what makes it stick.

By the end of this lesson, you’ll be ready for the homework assignment, which will test everything we covered today. Once you’ve got that down, we’ll be ready to start connecting real hardware in the very next lessons.

You’ve got this! Let’s turn you into a confident Python programmer so we can go build some amazing AI projects together.

AI on the Edge LESSON 2: Raspberry Pi Operating System for Artificial Intelligence

The major challenge we face in this AI on the Edge class is getting a Raspberry Pi 5 configures where you have all the AI Models, Libraries, Modules and Methods installed, and where they all play nicely together. Often, when you add a new model, the old model becomes broken. This is because when you install something new, it often times updates the dependencies. That means it updates a library already on your system. For example, lets say you have numpy 14, working with YOLO 11. Now you install mediapipe, and it updates numpy 14 to numpy 15. This then ‘Breaks’ your YOLO, as it wanted a different version of numpy.  Likely you will get frustrated and quit before you get the dependency problems solved. In order to get around this, you can use a special education version of the Bookworm OS, which has all the needed libraries installed already and working nicely with each other. The video above shows you how to install this OS. Once you do, no not update it, do not upgrade it, do not touch it. Use it to develop your programs and projects for this class. If you want to do something else with your pi, have a separate SD card.

AI on the Edge LESSON 1: Introduction and Class Overview

Welcome to our all new AI on the Edge class! I will need you to buckle up, get your hardware together, and get ready to teach AI who is boss! We will be using a Pi 5, and the Fusion AI Lab kit. I will show links to the hardware below. In today’s lesson I describe the Class Introduction, and will show you some demos of the types of projects we will be doing. You will either Drive AI or your will be Destroyed by AI. Don’t be one of the ones who will be eaten by it

The Future will Belong to Those Who Can Drive AI

Guys, get your gear, and make sure you end up on the right side of the Dystopian future that awaits the world.

I have provided Amazon links, so you can order everything in the same place

You Will need a Raspberry Pi 5
Order Pi 5

You will need a heat sink and fan
Order Heat Sink and Fan

You Will Need the Fusion AI Lab Kit
Order Fusion AI Lab Kit

You Will Need a 25 Watt Power Supply
Order Power Supply

You Will Need a Micro HDMI Cable
Order Micro HDMI Cable

You Will Need a Keyboard and Mouse
Order Wireless Keyboard and Mouse

This isn’t just another Raspberry Pi class. This is a complete journey where we’re going to take the powerful Raspberry Pi 5, combine it with the SunFounder Fusion AI Lab kit, and build real, practical, intelligent systems that run completely on the edge — no cloud, no internet required.

In this class, you’re not going to just learn how to blink an LED or run someone else’s pre-made script. You’re going to learn how to build smart machines that can see, listen, speak, think, and act in the real world. We’re going to combine computer vision, voice recognition, speech synthesis, sensor reading, motor control, and modern AI techniques — all running locally on your Raspberry Pi 5.

Over the course of this series, you will learn how to:

  • Capture and process live video from the Raspberry Pi Camera
  • Detect faces and track objects in real time using MediaPipe and OpenCV
  • Control hardware with voice commands
  • Make your Raspberry Pi speak with natural-sounding Text-to-Speech
  • Build smooth, responsive control systems using threading
  • Use displays like the SSD1306 OLED to show live information
  • Combine everything into impressive AI-powered projects

This class is designed for makers, students, hobbyists, and engineers who want to move beyond basic tutorials and start building real intelligent edge devices. Whether you dream of building smart robots, autonomous monitoring systems, interactive AI companions, or just want to gain serious skills in modern embedded AI, this class is for you.

I’m going to teach this the way I always do — step by step, clearly, and with lots of hands-on projects. We’ll start with the fundamentals and gradually build up to more advanced and exciting projects as the class progresses.

If you’ve ever wanted to move from “playing with the Raspberry Pi” to “building truly intelligent systems,” then you’re in the right place. This is going to be a fun, challenging, and incredibly rewarding journey.

So if you’re ready to stop just watching AI videos and start building your own AI on the edge… then buckle up, because we’re about to do exactly that.

Welcome to the class! I’m really glad you’re here. Let’s get started!

Object Detection Using YOLO and RTSP Camera on Raspberry Pi 5

OK guys, you spoke, and I listened. You all are asking for a lesson on how to do object detection on a Pi 5 using YOLO and an IP Camera. Well, you are about to get what you asked for. We will make this work, or we will DIE TRYING. Never fear, once you watch the video you will both understand and be able to do it on your own. First, I am assuming you watched our previous lesson where I showed you how to do the basic install and setup of YOLO. If not, never fear, I have the commands below. NOTE: This tutorial is geared towards bookworm OS. I strongly suggest you start with a fresh bookworm SC card, as there are many dependencies, and it is most likely to work if you start exactly where I am starting . . . with a fresh OS. Thes these are the commands I shared last week to get YOLO up and working: (just open a terminal, and paste these commands one at a time)

Now, I will explain this code, and will help you configure it for your cameras, but you will need to open up thonny, and paste in the following code as a start. IMPORTANT, as mentioned above, you need to set interpreter in thonny to the virtual environment set up in the process above. If this is not familiar to you, go back and watch last weeks lesson (click previous at the bottom of this post). Without further adue, here is the code we will work with today:

The video explains everything, please watch it!