Category Archives: Python

Raspberry Pi LESSON 61: Finding and Tracking Faces and Eyes In OpenCV

In this video lesson we show how to use Haar Cascades in OpenCV on the Raspberry Pi to find and track  faces and eyes. We show the intelligent way to find eyes, such that CPU resources are not wasted. Below we show the code for your convenience.

 

Raspberry Pi LESSON 59: Improved Pan/Tilt Tracking Control Algorithm


 

In this Video Lesson we show an improved control algorithm for tracking an Object of Interest in OpenCV. We develop a simple example of Proportional control, where the correction signal is proportional to the error signal. We show this is a much improved algorithm over our earlier one, which simply applied 1 degree corrections independent of the size of the error. The code we develop in this lesson is included below for your convenience.

 

Raspberry Pi LESSON 38: Motion Detection Alarm with Multiple Alarms

In this video lesson we show how to create an Alarm System based on a Raspberry Pi, with user input from a keypad, and user prompts on an I2C LCD Display. From the earlier lessons in this series, you must install the LCD1602 Library, and you must install the keypad library. We include the code that we develop in this lesson below for your convenience:

 

Library for Reading a 16 Button Keypad on the Raspberry Pi

In this lesson we show you how to create a Python Class and Library that allows you to easily get user input on a Raspberry Pi from a 16 button keypad. This will allow very easy interaction with the keypad.

The Library Code which we develop in the video is presented below for your convenience:

To use this code as a library, save it in the same folder as your python programs, and save it as KPLIB.py

 

This is a simple demo program that calls the library above, to receive input from the keypad.