Tag Archives: Raspberry Pi 5

AI on the Edge LESSON 14: Control LED Color With Voice Commands on Raspberry Pi 5

In this lesson we bring together the things we have learned in the earlier 13 lessons to create a project on the Raspberry Pi 5 that we interact with through voice commands, instead of the keyboard and screen. The project is to audibly prompt us for our favorite color. It will then audibly acknowledge our color choice, and then turn the RGB LED that color. This is my solution to the homework assignment I gave in LESSON 13.

This is the schematic we are using for the project:

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

This is the code we developed in the video:

 

AI on the Edge LESSON 12: Introduction to Python Threading on the Raspberry Pi

The challenge we face as we move forward in this class is that certain important functions which we need are ‘Blocking’ in nature. That is, they block the remainder of the program as they wait for input. For example, imagine blinking an LED and having the user input the delay time. When the program is waiting for user input, it can not continue to perform the blinking operation. This is also true for speech input. While the program waits for you to say something, execution of the remainder of the program stalls. To overcome this, we use threads. Threads are functions, or small snippets of code, which we can have execute in the background. In today’s lesson, I will show you how to incorporate threading into your AI projects.

In today’s lesson, this is the code we developed.

 

AI on the Edge LESSON 11: Control LED on Raspberry Pi With Voice Commands

In this video lesson I show you my solution to the homework assignment I gave in LESSON #10. The assignment was to control an LED using voice commands on the Raspberry Pi. This uses the Speech To Text expertise we developed in the last few lessons, but incorporates them into a real world project. With this basic framework, you are now equipped to make speech part of your future Raspberry Pi projects.

This is the schematic of the circuit we are using for our AI class. We go into great detail on this schematic in LESSON #5 if you want to learn more about it.

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

Now this is the code we developed in this lesson:

 

AI on the Edge LESSON 9: Make Your Raspberry Pi Talk with TTS

In this video lesson I show you how to make your Pi Project talk to you using Text to Speech (TTS). We will use the Piper Model which gives good clear voice, and a choice from a large number of different models.

In this lesson I show you my solution to the Homework assigned in LESSON #8.

In this lesson we demonstrate this program, which makes the Pi talk, through the Fusion HAT+ speaker. The homework was to create a program that smoothly adjust the brightness of an LED using a potentiometer. The project was also to speak to the user, indicating what brightness the LED was set at.

This is the schematic we are using on these projects;

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

This Schematic is explained in detail in LESSON #5.

Then this is the code we developed in today’s lesson.

 

AI on the Edge LESSON 6: Digitial Out, Servos, Analog In and PWM on the Fusion HAT+

In this video lesson we will become familiar with the FUSION AI HAT+, and we will learn how to do digital inputs and outputs, analog in readings, analog outputs, PWM and how to control servos. By the end of the lesson you should have the essentials you need to work with the Fusion HAT+.  The schematic for the circuit we will be using in today’s lesson if below. We describe it in more detail in the video. The schematic is:

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

In the video lesson we demonstrated the following programs:

Digital output to blink an LED:

PWM Example to Control RGB LED Color and Brightness.

Reading Analog Voltages on the Pi 5 Using the Fusion HAT+

Controlling Servos With the Fusion AI HAT+