Category Archives: Linux

How to make the 1-wire bus more reliable on a Raspberry Pi

Thermal sensors, such as DS18B20 can be connected to the Raspberry Pi via 1-wire bus. However, the 1-wire bus is not implemented in hardware, but only as software emulation on GPIO4, which has some major disadvantages. The 1-wire data link is acting as a very long “antenna” which catches interferences. All GPIO pins of a Raspberry Pi are directly connected to the CPU. So every interference cought on 1-wire bus is transported directly to the Broadcom SoC. Furthermore, the 1-wire protocol needs a very tight and time-critical signal generation, so it’s resource-consuming to communicate with 1-wire slaves and therefore highly unreliable if running on a non-real-time operating system.
I noticed that the DS18B20 sensors, which I have wired to my Raspberry, return at least once or twice a day bad temerature values, making it impossible to retrieve reliable max/min temperature data.
I recently stumbled upon a DS2482S-100 1-wire master breakout board that allows to control one or many 1-wire slave devices by simply sending I2C commands, relieving the task of generating the time-critical signals the 1-wire protocol requires. It provides bidirectional protocol conversion between an I2C master and 1-wire slave devices. The breakout board makes use of a DS2482S-100 converter, that is exclusively sold in a SO-8 package which doesn’t fit onto a breadboard.

Continue reading How to make the 1-wire bus more reliable on a Raspberry Pi

Voice-control RC sockets with Google’s AIY Project Kit

Issue 57 of the official MagPi magazine contains a Do-It-Yourself Artificial Intelligence kit made by Google. The build instructions inside issue 57 are straightforward, so that you can talk to an intelligent device within minutes.

However, the installation walk-through in the MagPi57 did not work without problems, therefore I recommend to follow the instructions on Google’s AIY Project Page.

Speech recognition is an amazing feature for the Pi and if you ever wanted to know what “the answer to life, the universe and everything ” is, you should go for it!

The kit turned out to be very popular and it is currently difficult to get hold on it. It is sold out at many places :-(.

Continue reading Voice-control RC sockets with Google’s AIY Project Kit

Add action buttons to motionEye for controlling pan-tilt brackets

motionEye is a great piece of software for controlling network cameras with a Raspberry Pi. With motionEye you can watch live video stream, detect motion, record images and videos.

Starting with version 0.30, motionEye can be configured to overlay buttons on top of a camera frame. These buttons will then execute custom commands when clicked. Thus, it is possible control to control a pan-tilt bracket or to toggle IR light for a PiNoir camera.

Here I mounted a PiCam onto a cheap (0.40 €) pan-tilt bracket with two SG90 servos from Aliexpress.

Continue reading Add action buttons to motionEye for controlling pan-tilt brackets

Setting up PS3 controllers on Retropie (Gasia/ Shanwan clones)

If you like retro-gaming you probably came across RetroPie, which allows to turn your Raspberry Pi into a retro-gaming machine.

RetroPie supports game-controllers of many different brands, however it can be difficult to configure them, especially if you chose a wireless (bluetooth) controller. I decided for a wireless Sony PS3 controller and purchased a pair of “compatible” devices from Aliexpress a.k.a. Gasia/Shanwan clones.


The RetroPie Wiki  provides some useful information on how to pair these controllers with a bluetooth dongle. At the moment RetroPie supports PS3 controllers using the sixad daemon, which is part of the QtSixA package.

The QtSixA  Sixaxis Joystick Manager can connect PS3 hardware, but it takes over bluez/ bluetoothd service and other bluetooth devices, so that keyboards or mice can’t connect when sixad is active.

Thus, I was wondering why there is no ‘native’ bluez support for PS3 devices. A Google search revealed that bluez comes with a ‘sixaxis’ plugin supporting only “genuine” PS3 controllers. However, I found on the gmane mailing list that bluez patches are currently under development, but none of them made it into an official or main developer branch, yet.

BlueZ PS3 support using the Sixaxis plugin

Fortunately Szymon Janc, one of the bluez developers, provided some patches for the Mediacenter. [Update: 2016-09-28] However, development of seems to be dead, since there were no updates for quite a while. Therefore, I do not expect that patches supporting other PS3 clones will be released soon.

Here is a short tutorial on how to use these patches for RetroPie and to fix the annoying PS3 Shanwan/Gasia pairing problem:

openSuSE Leap 42.1 first Impressions

A few weeks ago the openSuSE project team released a new version of their Linux distribution, called “Leap 42.1”. It is based on SLE (SuSE Linux Enterprise) and therefore will receive fixes and security updates from SLE. Maintenance and bug fixes will also come from the openSUSE community.


Several desktop applications received upgrades in this release. Leap 42.1 features the new KDE-Plasma 5 Desktop (5.4), Libreoffice 5 and Gnome 3.16. The Linux kernel moved to version 4.1.

Unfortunately, there is no live system DVD available, so there’s no way to test hardware compatibility before you do the upgrade. However, you can still create your own using SuSE Studio, but this is certainly not an option for a quick preview.

Continue reading openSuSE Leap 42.1 first Impressions