Tag Archives: Tutorial

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

In today’s lesson, we’re going to make a huge leap forward in giving our Raspberry Pi some real personality. We’re going to teach it how to talk using Text-to-Speech (TTS). Instead of just blinking LEDs or printing text to the screen, our Pi will now speak out loud with a clear, natural-sounding voice.

This is a really fun and important lesson because one of the main goals of this class is to build intelligent systems that can interact with us in more human ways. Being able to make your Raspberry Pi speak opens up all kinds of exciting possibilities — whether you want your robot to tell you what it sees, have your AI assistant read sensor data out loud, or just add some personality and humor to your projects.

In this video, I show you how to use the TTS capabilities on the SunFounder Fusion AI Hat. You’ll learn how to install and set up the TTS engine, speak simple sentences, change voices, and control when the Pi talks. We’ll also look at how to make the speech sound more natural and how to integrate it smoothly into your programs without freezing everything else.

By the end of this lesson, your Raspberry Pi will be able to speak clearly and confidently — which is going to make the rest of our AI on the Edge journey a lot more exciting. Voice output combined with voice input (which we’ll work on soon) is what turns a simple circuit into a real interactive AI companion.

So go ahead and grab your Fusion AI Hat, plug in a speaker, and let’s give your Raspberry Pi a voice! As always, I encourage you to code along with me in the video and then experiment. Try making it say funny things, read temperatures, announce when it detects a face — whatever sparks your creativity.

This is where your projects start to feel truly alive.

I’m really excited for you on this one — let’s make your Raspberry Pi talk!

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.

 

Arduino Tutorial 55: Measuring Distance With HC-SR04 Ultrasonic Sensor

This lesson builds on the work done in Lessons 53 and 55. In this lesson we use the Ultrasonic Sensor to build a distance sensor. The HC-SR04 ultrasonic sensor can be programmed to send out a ping, and then measure the time it takes to hear the echo of the ping come back, after bouncing off a target. Knowing the speed of sound allows us to calculate distance to the sensor.

The circuit uses the following Schematic:

HC-SR04-Schematic
Schematic for Connecting the HC-SR04 to an Arduino

This is the code we develop in the video

The sensor is part of our Elegoo Kit , so if you get this kit, you will be using the same hardware we are using. This project builds on the work we did in Lesson 53.

For this build we will be using an Arduino Nano, which allows the project to be built on a single breadboard. You can use the Arduino Uno if you do not have a Nano, and things will work out the same. The build neatness is also facilitated by using small straight jumper wires, which you can get HERE.

Arduino Tutorial 40: Controlling DC Motor Speed and Direction with Pushbuttons

In this lesson we explore how to control the speed and direction of a DC motor using two buttons. We are using the L293D motor controller and a small DC motor for demonstration purposes. An official Arduino Uno R3 is available HERE. In this new series of lessons, I will be using the sensor and other components found in this KIT. The basic circuit was explained in Lesson 37, and we are using that work as a starting point. The schematic below will get you started in connecting your circuit. Be sure and connect one of the Arduino ground pins to the ground rail in the second to the bottom row in the diagram below. It is good practice to connect all your grounds together.

DC Motor Controller
Connection Diagram for a DC Motor Controller using the L293 Control Chip

The code we developed in the video lesson is shown below for your convenience.

 

Arduino Tutorial 36: Understanding How to Use Tilt Switches in Your Projects

Tilt Sensor
This Circuit Gives Visual Indicator if Board Has Been Tilted

This is a simple project that allows you to create a circuit which will give a visual indication if the breadboard has been tilted. In the upright position, the Green LED is illuminated. To the left of the board is a tilt switch. If the project is tilted, the switch will go from the closed to the open condition. This can be detected on the arduino, and then the red LED is illuminated. The video below explains how to do this simple project.

An official Arduino Uno R3 is available HERE. In this new series of lessons, I will be using the sensor and other components found in this KIT.

You should create your own code based on the instructions in the video, but if you are having trouble, I include the code developed in the video below: