In my evolving robot car project it is now time to go for a test drive. More precisely, I would like to establish bidirectional communication between the Raspberry Pi, acting as spiritus rector, and the Arduino, translating abstract intention into concrete motor control with the Adafruit Motor Shield.
Ultrasonic Range Sensor on the Raspberry Pi
In this project I am interfacing the HC-SR04 ultrasonic sensor module to a Raspberry Pi to measure distance. Later on the Raspberry as well as the sensor will be part of an obstacle avoiding robot. I use my oscilloscope to check whether the sensor is working as announced.
[Read More]Python virtual environments
Getting to know pipenv, pyenv, conda and friends
Anyone who works on Python projects and uses various packages will sooner or later have to deal with different versions of packages across different branches and projects. Because each project has its own set of dependencies, it’s a good practice to avoid mixing them. If all the dependencies are installed together in a single Python environment, then it will be difficult to discern where each one came from. In the worst cases, two different projects may depend on two different versions of a package, but with Python you can only have one version of a package installed at one time. What a mess! Virtual environments address this issue. A virtual environment, put simply, is an isolated working copy of Python which allows you to work on a specific project without worry of affecting other projects.
[Read More]Image Manipulation with Python Pillow
Normally I use GIMP when I need to resize, crop or retouch images in various ways. However, for my last post on the Berlin Festival of Light I would have had to manually resize and crop a whole bunch of images at a time. That's why I took a look how Python could help with this task, and found PIL, the Python Imaging Library, in newer versions known as Pillow.
[Read More]First post!
Hello world, this is my first post!
Like many others, I start with some remarks on how this blog is set up. I'm using the static site generator hugo
and the theme beautifulhugo
. Since installation was straightforward, as described on the hugo
website, I will only list a few remarks, as a memory aid, on how I tweaked details of the layout.