Tag Archives: Python

AI on the Edge LESSON 4: Python Averaging Grades Homework Solution

In this video lesson, I show you my solution to the Homework Assignment in LESSON #3. If you were not able to do the homework yourself, you can follow along in the video. Make sure you can do it on your own, without checking back to my solution. You need to understand these basics before moving on the class.

This is my homework solution.

 

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

This new class, AI on the Edge, will use Python as the primary programming language. If you are not familiar with python, this video lesson will teach the essentials in one go. Go through the video, and follow the examples. Practice the things in the video, and then do the homework. If you can learn these basics, you should be able to follow along with the balance of the class.

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.

PyQt Essentials for Absolute Beginners

In this Video Lesson we show you how to create a Graphical User Interface to allow you to interact with your python program and hardware projects. The GUI can have buttons, slider bars, radio buttons, drop down menus, and many more widgets. In this lesson we show you how to install the package, and step-by-step instructions on how to use it. For your convenience, here is the code we developed in the lesson.

 

Sending Data Over WiFi Between Raspberry Pi Pico W and Your PC

In this video lesson we show how we can send and receive data between the Raspberry Pi Pico W, and your PC. We will be running python on the PC, and we will exchange data using the UDP protocol. UDP is simple, and a very reliable way to send data packets back and forth. In this example, we will be demonstrating a simple Client Server relationship between the Pi Pico and PC using UDP over WiFi.

For your convenience, this is the “Server” software you will run on the Pi Pico.

Notice that the above code wants to load a “secrets” file that contain your WiFi name, and password

You should edit the code below with your WiFi username and your password, and then save the file in the Pi Pico lib folder, with the name secrets.py (don’t forget the .py)

Now, on the PC side, you will run your client, which will be run in Python. Here is the client software: