Using PIL and OpenCV, this guide will show you how to simulate a small full-colour display attached to the Raspberry Pi on a PC. The virtual display will then allow you to create animated or interactive content initially on the PC. Then, with a little code modification, port the Python code to the Raspberry Pi. I also include example test code with this guide. Continue reading “Simulate Animated OLED/LCD Display On PC With PIL and OpenCV”
Tag: Python
Create OLED or LCD Display Content with Pillow – Graphics and Fonts
Featuring the SSD1331 display and the Python Pillow library, I create and test content on the PC before porting to the Raspberry Pi with the attached OLED screen. Also, I include Truetype FreeFont and graphic images as part of the setup and demonstration. Additionally, I include plenty of example Python code. Continue reading “Create OLED or LCD Display Content with Pillow – Graphics and Fonts”
OLED Display Library Setup for the Raspberry Pi featuring SSD1331
Thanks to an impressive Python library, we can connect various types of OLED displays to the Raspberry Pi such as the SSD1331 colour display. So to get this vivid, high-contrast 16-bit colour display up and running, I take a look at how to set up this library from Continue reading “OLED Display Library Setup for the Raspberry Pi featuring SSD1331”
. Additionally, I also show how to install and run the many examples available.Ultrasonic HC-SR04 Sensor Python Library for Raspberry Pi GPIO
This guide takes you through the steps to install and set up the new HC-SR04 distance measuring sensor Python Library. First, we connect the ultrasonic module to the Raspberry Pi GPIO pins. Then, we use pip to install the Python module. Followed by, a walkthrough of the ultrasonic Python module features. Continue reading “Ultrasonic HC-SR04 Sensor Python Library for Raspberry Pi GPIO”
Python and OpenCV Setup on Windows 10 with Geany Text Editor
Ideally, to save the Raspberry Pi SD Card, we can debug the bulk of the Python code on our much faster laptop or PC instead. Therefore I go through the install process of the Python programming language, and I also include installing OpenCV. Additionally, I recommend the Geany text editor which I recently discovered. Continue reading “Python and OpenCV Setup on Windows 10 with Geany Text Editor”
Pi Camera Video Capture with OpenCV and Python Multithreading
In this article, I install the Raspberry Pi Camera which I will be using to add camera vision to a robot. Also, to maximise the performance of OpenCV and Camera, I will be using a utility to add multithreading to the Python applications. Furthermore, I include Python demo code which also supports USB webcams. Continue reading “Pi Camera Video Capture with OpenCV and Python Multithreading”
360 Degree Mod for Servo Continuous Rotation – Guide
In this feature, I am going to do a 360 degree mod on a micro servo motor for continuous rotation. I go through the modding step by step with clear pictures of the conversion process. Also, Python code will be included to drive the servo 360 degrees from the Raspberry Pi. Continue reading “360 Degree Mod for Servo Continuous Rotation – Guide”
Micro Servo 9g – Raspberry Pi Servo Motor Python Code Test
In preparation for a future project, I’m taking a close look at the Micro Servo 9g I bought from Ebay some time ago. So, to build the servo motor into a project, I require electrical specifications, wiring diagram, drawings with dimensions, 3D CAD model, and also test code for Arduino and Raspberry Pi. Continue reading “Micro Servo 9g – Raspberry Pi Servo Motor Python Code Test”
Multithreading Raspberry Pi Game Controller in Python
Multithreading on the Raspberry Pi is an excellent way to keep the main thread of your program running as efficiently as possible. To demonstrate, I show how you can move game controller polling routines to a separate thread. Find the Python example code for robot control at the end of this feature. Continue reading “Multithreading Raspberry Pi Game Controller in Python”
Object Detection and Tracking with OpenCV and Python
In this feature, I look at what it takes to setup object detection and tracking using OpenCV and Python code. Using the code snippets included, you can easily setup a Raspberry Pi and webcam to make a portable image sensor for object detection. Continue reading “Object Detection and Tracking with OpenCV and Python”