Category Archives: Programming

Getting Picamera2 Running in Docker on Raspberry Pi OS Debian Trixie

Welcome back! I want to write about a specific challenge that popped up while upgrading my Raspberry Pi setup. Specifically, running the Picamera2 module inside a Docker container on Debian Trixie with Python 3.13. While the library works great natively, combining it with containerization introduces some versioning headaches. The stock Debian repositories often ship older versions of libcamera that lack the necessary Raspberry Pi camera pipeline support. Additionally, there are missing dependencies like the KMS module for Python that aren’t available in standard repos. In this post, I will explain how to configure a custom Docker image to bridge these gaps using system-wide packages and specific environment variables. We’ll cover setting up apt sources, handling library versions, and ensuring the container can actually detect your camera hardware without errors. This setup allows for separation of code while still accessing hardware related stuff.

Continue reading

Laser Cut LED Teddy Bear with Raspberry Pi Pico

Today I am sharing a new build project that bridges the gap between woodworking and electronics. While this creation is not directly related to drones or flight controllers, it does utilize microcontrollers in an interesting way. The centerpiece of this project is a laser cut LED Teddy Bear. This piece features LEDs mounted at the back to emit light through a cutout shape made from plywood. It includes additional engraving and finishing touches to enhance the surface appearance. Since this project combines woodworking techniques with electronic design, I will divide the discussion into two main sections.

Continue reading

Is HTTPS Really Safe? Unveiling the Risks Behind Secure Connections

The internet has become an integral part of our lives, and with that comes a growing concern about online security. You’ve likely noticed the padlock icon in your browser’s address bar when visiting websites – this signifies an HTTPS connection. But how safe is it really? This blog post delves into what HTTPS is, why it exists, and explores some surprising vulnerabilities that can arise even with seemingly secure connections.

Continue reading

Implementing Frame Buffer for OSD

Over a year ago, I was describing a project about an On-Screen Display (OSD) based on the RP2040. It was a simple yet effective application that allowed me to display flight telemetry on a screen in real-time. The solution was somewhat limited because it was created out of necessity. I have several RC planes with FPV capabilities. During flights, I wanted information about current position, battery voltage, etc., displayed on the video feedback. All this information was displayed using four lines of text, two at the top and two at the bottom of the screen. Since then, project requirements have evolved, and I needed to add more functionality to keep up with my needs. In the newest update, I’ve focused on enhancing I2C transmission and adding a frame buffer.

Continue reading

STM32 project remote debugging with VS Code

During my classes at WRUST (Wrocław University of Science and Technology), I teach about Robot Controllers where most of the course related to embedded systems is centred around STM32 ecosystem. For quite some time, STM32CubeIDE software was used there. However, the version that is being used there is quite old (1.4.0). The newer versions of the software offer a lot of new features that are useful during debugging. On the other hand, any newer version than 1.4.0 has issues with remote debugging, which is a core part of RemoteLab. Fortunately enough, there is a good substitution that connects both words: new features and operational robustness. The solution is based on VS Code and uses cmake as a project build tool.

Continue reading

Raspberry Pi Pico remote debugging with VS Code

Since I started working with Raspberry Pi Pico, I mostly had it connected to my PC next to me. However, it is possible to configure an environment for remote debugging. There are a couple of things that you need, and of course some configuration of your IDE is needed as well. I will walk you through the main steps that are required to setup everything correctly and start a remote debugging session.

Continue reading

RemoteLab can now plot data in real-time

It has been a while since I wrote about RemoteLab. A new semester is approaching at the Wrocław University of Science and Technology and I thought that a long awaited feature should be released. I hope this will improve the user experience while working with RemoteLab. This is a second major update since moving to Django, unifying the status server with the camera server, and of course open sourcing it. Besides real-time plotting, there are some additional updates as well.

Continue reading

Streaming images and video using the Raspberry Pi Camera module

Sometimes streaming video might not be as straightforward as it might seem to be. In this blog, I will walk you through some ideas on how to stream video using Raspberry Pi Camera module and some Python libraries. Different techniques focussing around picamera module will be investigated along with some front-end code to facilitate reception via a web browser.

Continue reading

Raspberry Pi throughout winter and how to make it warm

During the summertime, I have created and assembled a monitoring station based on Raspberry Pi and Raspberry Pi Camera module. The main purpose of this monitoring station was a video survivable system with some digital outputs to control the lights. The overall device is based on the Raspberry Pi 4 that sits inside a tight casing with the power supply module and the relay module. I do not want to write much about how it was built, but a bit more about how it is being maintained plus how it works during winter when temperatures are starting to go below zero.

Continue reading

GPS module for a RC plane

Today I would like to present you a small GPS module with super capacitor backup. Having GPS coordinates known during flight time is very beneficial. There are multiple ways in which longitude and latitude can be used to enhance the RC flight experience. Once again we have, and for the most obvious reason, the ability to track a plane or a drone. We can also calculate the current distance to a flying object in line of sight. Finally, using GPS coordinates, it is possible to implement an autopilot and a feature called return to home in case of broken radio link.

Continue reading

Quadrature encoders with Raspberry Pi Pico PIO

When you want to control a DC motor, there are two ways in which this could be approached. It can be controlled (a closed-loop approach) or simply driven (an open-loop approach). The open loop approach is the easiest one since it does not relay on any addition knowledge about the system or the motor itself. The control process is straightforward. You send the control signal and hope that the DC motor will rotate at the desired speed. However, in many situations, it is insufficient. For example, when a car goes uphill, it requires more torque, so the power output needs to be adjusted. In the end, the same control signal will not give the same results as the environment changes.

In this post the main emphasis is put on quadrature encoders. The quadrature encoder is a sensor mounted next to motor which allows to measure how fast the shaft is turning. Going further, the usual implementation of the quadrature encoder sensor counts how many times the state has changed. However, before going into details, let us focus first on quadrature encoders and how they work.

Continue reading

On-screen Display with Raspberry Pi Pico

For quite some time, I was curious about the on-screen displays (OSDs). It is a piece of equipment which enables you to put some text or graphics directly on a video stream. I am going to present you my solution for this device and, most importantly, why it is useful. The project was based on the RP2040 microcontroller which can be found on a very popular platform, Raspberry Pi Pico.

Continue reading

STM32 RTC Clock downsides and backup domain registers

The title for this blog can be a bit misleading but let me assure that all these three things have something in common. The RTC clock allows you to measure real time and by assumption this measurement should be very precise. And the key word is assumption because depending on what kind of clock source you will chose you can get completely different results. All of it is dependent on the clock source, thus the internal oscillator. Additionally, since RTC shares the same special register space I will also discuss so-called backup registers. Let us get started.

Continue reading

My quadrocopter adventure

Well, I feel like this will be one of these sentimental entries, but not entirely. I would like to present my journey with quadrocopters, or drones in general. I first started to invest in drones when I was at my university. The passion developed in 2012 when I was defending my Bachelor’s degree and I decided to make a thesis about it. The topic was ‘Filtering and validation of measurements from accelerometer and gyroscope in Matlab/Simulink for a quadrotor flying robot’. In this blog post, I will tackle different aspects, namely software and hardware (mechanics and electronics).

Continue reading
Enjoying the content? Buy me a coffee ☕ and help keep new posts coming!
Your support fuels fresh articles and keeps this space free of ads. Thank you for being part of this journey!
For those who support me unpublished premium materials are waiting.