Arduino Port Access & Bitwise Op. using Simple Robot Controller

In this article, we look at how to access an Arduino port to read or manipulate a group of pins in C code. We use bitwise operators to read, set and invert bits in variables and device registers. To help with this feature, we will use a simple robot controller to demonstrate how we might use port manipulation. I include, for example, Arduino test code and illustrations of bitwise operations. Continue reading “Arduino Port Access & Bitwise Op. using Simple Robot Controller”

Simulate Animated OLED/LCD Display On PC With PIL and OpenCV

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”

Using I2C Serial Bus to Connect Raspberry Pi to Arduino

At some point, I’ll be looking to extend my Raspberry Pi robot, and one of the ways to do that is to use I2C (Inter-Integrated Circuit) serial devices. So, in this feature, I look at how to access an Arduino board from the Raspberry Pi using this serial bus. I also include both Raspberry Pi and Arduino code to demonstrate the use of the serial interface. Continue reading “Using I2C Serial Bus to Connect Raspberry Pi to Arduino”

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   Luma.OLED. Additionally, I also show how to install and run the many examples available. Continue reading “OLED Display Library Setup for the Raspberry Pi featuring SSD1331”

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”

Build a Robot Battery Pack with Li-ion 18650 Cells

In this post, I will be creating a two-cell 18650 Li-ion battery pack to power my robot projects. I show a step by step build process following a brief description of the items I use. If you own a balance charger already, you may also want to use the battery pack box to balance charge pairs of cells for other use. Continue reading “Build a Robot Battery Pack with Li-ion 18650 Cells”

Motor Driver for Raspberry Pi Robot using TB6612FNG

In this feature, I take another look at the TB6612FNG motor driver, but this time, with the Raspberry Pi instead of the Arduino. The H-Bridge module is the chosen robot driver for my Pi Wars entry effort. View this post for circuit examples and Python test code to get started with your own Robot Project. Continue reading “Motor Driver for Raspberry Pi Robot using TB6612FNG”

Pi Wars 4.0 Update – Raspberry Pi Robotics Challenge

With less than ten weeks to go for The Pi Wars 4.0 competition day, there is still much to do. I imagine it’s going to be panic time for many of the competitors. I’m still a reserve competitor, but I have already seen indications of entrants dropping out, so there is still hope for me yet. The Raspberry Pi robot vehicle software is the most challenging task to complete in my entry effort, and I believe this will be the same for many other teams as well. Continue reading “Pi Wars 4.0 Update – Raspberry Pi Robotics Challenge”