Category Archives: Python

Library for I2C Connection of the LCD1602 to the Raspberry PI


This lesson shows how to connect an LCD1602 to a Raspberry Pi using only 4 wires by I2C. You will need to copy the code below, and create a program called LCD1602.py, and save it in the same folder your main python programs are in.

 

Using an Arduino with Python LESSON 11: Controlling an LED from Python

In this video lesson, we show how to control an LED using python. Python sends commands to arduino, which then controls the LED. We also create a vPython visual, where the ‘Virtual’ LED mimics the behavior of the real LED. This a really cool demonstration and hope you enjoy it. I include below the code we develop in the video. On the arduino side we end up with the following:

And on the python side we have:

 

Using an Arduino with Python LESSON 8: Live Thermometer 3D Visual Using DHT11

In this video lesson we connect the Arduino to a DHT11 temperature and humidity sensor. We show how to wire the device up, and then how to code the Arduino. The data is passed from the Arduino to python. We then create a live 3D thermometer model that updates as the temperature changes.

On the arduino side, this is the code which we use:

Then on the python side, we use the following code:

 

Improved Gesture Recognition in Python and MediaPipe

In this video lesson we show you how you can improve the accuracy of your gesture recognition program developed in the last lesson. We do this by normalizing the hand landmarks distance matrix to a standard size. By doing this, you get accurate results independent of the distance your hand is from the camera. For your convenience, I include the code below which we develop in this lesson. Enjoy!

 

s lesson. Enjoy!

AI for Everyone LESSON 26: Accurate Gesture Recognition using Python and MediaPipe

In this lesson we demonstrate how to use mediaPipe and Python to create an AI system that can accurately recognize hand gestures. This is follow on work to what we developed in Lesson 25. The code we developed is presented below.