Category Archives: Programming

Jupyter Notebook server on Raspberry Pi

Recently, when I wanted to install IPython notebook server I discovered that for quite some time the project had changed its name to Jupyter. You may recall one of my posts about the IPython where I presented how to install it on Raspberry Pi. Now, I would like to present the Jupyter project to you which comes with some neat new features.

Continue reading

Face detection with OpenCV and Python on RaspberryPi

Many articles here and there describe how to use OpenCV on Raspberry Pi. However, most of them are about setting up the environment by hand — meaning compiling OpenCV from sources. There are two main disadvantages to this approach. Firstly, you have to spend some time to compile it. On Raspberry Pi 3 it takes quite some time, and not mentioning the earlier versions of this mini PC. Secondly, maintaining up–to–date version requires additional time. Still, you can go for middle ground — cross–compilation that requires less time but you have to set up the environment properly. Having above in mind I will introduce you to the OpenCV with Python interface installed from pre–compiled packages. If I have your attention keep reading 😉

Continue reading

SPL vs HAL: which one should you use (and Low Layer Library) — part 2

stmcube_import_step1

Some time ago I have written SPL vs HAL: which one should you use where I have focused on differences between two main frameworks for STM32 — Standard Peripheral Library (SPL) and Hardware Abstraction Layer commonly known as HAL. Since the recent post only focuses on those two sets of libraries I have decided to write some examples which can tip the scale. What is more, at the end of previous article I have asked an important question for a developer — does the STM is going to introduce us to a brand new library. Answer to this and other questions are further in this post.

Continue reading

STM32 HAL driver for I2C OLED display with U8glib

oled_display_ssd1603

Recently, I have come to a conclusion that it would be good to print the state of my quadrocopter on a display. The question was what kind of display should I use. I decided to give a try to a small 0.96″ OLED display with I2C interface. It is based on SSD1603 driver. You can see this display on the image above. However, there was an issue regarding the screen controller. But it was soon solved. I have come across the U8glib which is a graphic library, quite popular among Arduino users. As soon as I started to read about the library I realized that it does not support STM32, not mentioning the HAL library.

Well, I have solved that 😉

Continue reading

Xenomai Linux drivers and OROCOS components on GitHub

Some time ago I have written a few real-time Linux drivers for Xenomai and complementary OROCOS components. But first thing first! What the heck is Xenomai and OROCOS? To keep it as short as possible; Xenomai is an open-source project which aim is to bring real-time API to Linux based system. It is an extension to the Linux kernel which makes it a hard real-time operating system. On the other hand, OROCOS is a robotic framework that brings a vast number of libraries and a toolchain to create components. What is more, Xenomai and OROCOS do play along which means you can facilitate features of both i.e. to create a hard real-time components.

If you are interested you can find the code for each driver and for each OROCOS component on my GitHub repository. Feel free to fork!

Below are direct links to the repositories:

Driver for Sensoray 626 multi analog/digital I/O board

Driver for JR3 6 DoF force/torque sensor

Driver for Mecovis multi I/O card

OROCOS component for Sensoray 626

OROCOS component for JR3

Using FatFS with HAL

Recently I have written a short post about the HAL library created by STM32. The HAL is gaining popularity among hobbyists and is more and more frequently used. However, when you would like to use it for something else than just basic stuff like generating PWM on digital output you have to write it by yourself. Not so long ago I had to use SD card in one of my projects. It turned out that there is no driver for FatFS based on HAL – at least there was not. I decided to write the driver and here you can read about it…

Continue reading

A small operating system

There are many operating systems: Linux, Windows, iOS,… But there are a few which can work in real time like Linux Xenomai. However, there are very little which can fit a microcontroller. One of them is a FreeRTOS. There are some variations of the FreeRTOS which can handle different conditions and requirements.
This blog post is not about such operating system, however…

Continue reading