AI ON THE JETSON NANO LESSON 28: Tracking Objects in OpenCV using Contours


In Lesson 27 we learned how to isolate an object of interest by masking it, and separating it from the background. In this lesson we learn how to track the object of interest by creating OpenCV contours, and then drawing a con tour or box around the object of interest in the original frame. This allows us to track objects of interest in real time on live videos. The video above takes you through the lesson step-by-step, and below is the demo code we developed during the lesson


AI ON THE JETSON NANO LESSON 29: Gear to Create a Pan Tilt Camera Platform for Real Time Tracking

Now that we are able to isolate and track objects using the Jetson Nano and OpenCV, now we can create a pan tilt platform for the camera, so the camera can actually track and follow the object of interest in the scene.  We will do this be using two servos and then some mounting brackets. Below, I show the gear you will need to order to continue.

First we will need to be able to mount our camera on the pan/tilt bracket. If you have the Logitech WEB cam, then it can be affixed to the bracket in any number of different ways. I you are using the Raspberry Pi camera, you will need to either pick up the Logitech WEB cam, or you will need a longer cable for the Raspberry Pi Camera. For this project, I prefer the logitech WEB cam. But if price is a barrier, the simplest solution is to order the set of longer cables. You can get this gear from these links:

Logitech WEB cam

Raspberry Pi Long Camera Cable Set

Now you will need a couple of good servos to drive the pan tilt brackets. I found this set works well, and the price is good, and you will end up with a couple of spares, which is always useful.

Servo Set

You will also need a pan/tilt bracket for the servos and cameras, and the one below is the set I am using in this project.

Pan/Tilt Camera Bracket Set

And Finally you will need an PCA9685 I2C Servo Control Board. You can pick up what you need here:

Servo Control Board

The link above is for a pair of the boards,  and you only need one. I suggest getting the pair so you have a spare if needed, or it can be used for other projects. And that is all you will need!

Arduino Tutorial 51: DHT11 Temperature and Humidity Sensor with LCD Display

This shows our completed build with an Arduino Nano, LCD and DHT11 Sensor

In this lesson we work towards a stand alone Temperature and Humidity project using the DHT11 sensor.

This video will take you through the build and coding step-by-step, and the schematics below will help you follow along at home.

Our goal in this lesson is to add an LCD to the project. In lesson 50, we got the sensor working, and here we want to get the LCD connected. We are working with components from the Elegoo kit, which you can get HERE. In addition, your build can be much neater, cleaner and more stable is you use an arduino nano, instead of the standard arduino uno. The nano is small, and has male pins that allow it to be plugged directly into the breadboard, as seen above. I strongly suggest picking up an Arduino Nano, which you can get HERE. This lesson follows on to the work done in lesson 50. To recap, the DHT11 is connected as follows:

DHT11 Sensor
Connection schematic for the DHT11 Temperature Sensor.

You will also need to add the LCD, using the following schematic:

Arduino LCD Schematic
This schematic will allow you to connect the LCD to the

In my photograph at the top of the post, you can see it is important to keep the build neat, as there are lots of connections which must be made. Neat work is facilitated is you use short jumper wires, instead of the big male to male wires. You can get a jumper wire set that will keep your work neat HERE.  I am not trying to sell you a bunch of junk, but as projects get more complicated, you really need to use the short straight wires, or your build will become a rat’s nest.

We develop the code in the video in detail, but you can get the finished code down below.



AI on the Jetson Nano LESSON 27: Tracking Objects in OpenCV Using HSV Color Space

In this lesson we show how to track items in OpenCV based on color using the HSV color space. Below is the code we developed in this lesson.


Arduino Tutorial 50: How to Connect and Use the DHT11 Temperature and Humidity Sensor

In this lesson we show how to measure Temperature and Humidityusing the DHT11 sensor. This is a relatively simple sensor to use, but you will have to download and install a library. In our earlier lessons, we have used libraries before, but this is the first time you will have to download a library. The library I used was downloaded from HERE. The video explains in detail how to install the library, but in a nutshell you download the library from clicking the link on that page. Then you need to open the downloaded zip file, and then drag and drop the contents of the zip file to your desktop. Next you must determine where your arduino library folder is. You can do that by going to the arduino IDE, and under “file” select preferences. This will show you your “Sketchbook Location”, and that folder will contain your libraries folder. The folder you dragged and dropped onto your desktop should be dragged and dropped now into this library folder. The video shows you how to do this if this description is not clear. Now you will need to connect the sensor, according to this schematic:

DHT11 Sensor
Connection schematic for the DHT11 Temperature Sensor.

The video develops the code to use this sensor step-by-step, but the code is included below for your convenience.


Making The World a Better Place One High Tech Project at a Time. Enjoy!