Light effect for Raspberry Pi based media player – raspbmc or OpenELEC/LibreELEC

Raspberry Pi can be easily used as media player. We can choose from many variations, but the one I’d like to focus on is Raspbmc based on XBMC. Raspbmc with hyperion has ability to drive RGB LED strip or daisychain using Raspberry Pi. The important part is that it will lit the RGB LEDs accordingly to the screen borders in realtime. It’s used to make the visible part of the picture more vivid and extend it beyond the display, and it’s simply quite cool:

So, the effect is interesting, but … it doesn’t bother you ? Will my eyes hurt, or am I going to be distracted by it ? What about fast changing scenes ? Well in fact – no worries, you’ll forget about it in 5 minutes, mostly becasue it effects only perephrial vision. Try it out yourself! As it turns out it’s very important to use original Pi board, since Piotr (more in comments) had bad experience with clones – there’s no communication with LEDs!

Let’s begin, our system will not require any soldering!

List of material

  • 1 piece of Raspberry Pi 2,3 or 4B: RaspberryPi shield
  • 10 jumper cables that fit PINs in Raspberry Pi, you’ll need two male-female and two female-female ones: P2210009-small
  • 1 power source 5V 2 to 6A based on the length and type of LED strip. It’s going to power both LED strip and Raspberry Pi.
  • 1 socket with ability to fit the power source and attach jumper cables: OLYMPUS DIGITAL CAMERA
  • 1 piece of RGB LED strip with  WS2801 chip or other form of RGB LED WS2801 enabled “x-mass liights”. 2 meters strip will fine for 24-36″ TV, while 3 metrs will last for 42-46. You might also find strips using GRB configuration, as one of the commenter noticed – software can also support such configuration – see the Software section and HyperCon


CAUTION:  RGB LED strip with WS2801 chips is powered via 5V power supply (PSU) and usually will need about 7 Watts  per meter, so be very carefull when calculating the PSU! We’re going to connect power for Raspberry Pi using it’s PIN – not via USB. Why ? Most of the problems with strip comes when using separate PSUs and it also allows to use just one powerfull PSU, without worrying about USB cable with thin lines. But the downside is that we will be bypassing the internal fuse in Raspberry Pi, so choose a very stable PSU!

Should you choose strip or xmass lights ? Each have pros and cons, but let’s deal with that later.

Lets start by preparing our power socket for connection to RaspberryPI and the LED strip:
Connecting Power Wires
The important step now is to connect data & clock signals to proper end of the strip (look at the arrow):

  • PIN 23 – connect to CLOCK on the stip (abbrv. CL)
  • PIN 19 – connect to DATA on the strip (abbrv. DO)
  • PIN 2 – the +5V – to PSU
  • PIN 6 – the GND – to PSU

Let’s properly wire the power to Raspberry Pi:
2. Power Pins Connected
Same wiring for the LED strip:
3. Connected LED Strip
And finally – clock and data wires connected to LED strip:
4. Everything is Connected
Now STOP:  Did you connect the data & clock lines on the correct end of the strip?

Our cabling should looke like this:

Chip WS2801



Let’s start with raspbmc distribution – first we need to log in via ssh to raspbmc running on Pi. User/password are the same as in default Rasbian distribution pi and raspberry (as of January 2014).
Now let’s prepare to install ‘hyperion’.

Wait, what is ‘hyperion’ ?

Well it turns out that raspbmc already includes the support for  RGB LED strips – it’s called  ‘boblight’. This is a very well working software, but it happens to be slow – when using more LEDs (i.e. 150 when using 3 meters strip). So let’s replace it by better and faster software – hyperionem.

First of all we need to install proper libraries to build the software:

sudo apt-get update
sudo apt-get install libqtcore4 libqtgui4 libqt4-network libusb-1.0-0 libprotobuf7 ca-certificates

Now let’s turn off boblight:
sudo /sbin/initctl stop boblight

All that’s left is to install hyperion:
wget -N
sudo sh ./

Let’s test the connection to the strip – lit some LEDs!
hyperion-remote --priority 50 --color red --duration 5000

Now all you need to do is to configure hyperion according to your LED positions and quantity and enjoy the view!
Hyperion manual gives us Java program (), which looks like this:


So it’s quite easy to select proper number of LED, their placement, clockwise orientation, etc. It’s also the place to check right configuration of the color coding on the strip – RGB or GRB.
Leave all other to defaults and save the file as hyperion.conf.json

Now using scp or FTP – upload the hyperion.config.json file to Raspberry Pi running RASPBMC. Then, login via ssh onto RASPBMC and issue:

sudo cp hyperion.config.json /etc/hyperion.config.json

That’s it!


Now, OpenELEC is very XBMC-centric distribution, with little overhead of operating system. This comes down to simpler installation, but still I’d like you to go and read the raspbmc paraghraph, as we will need it for configuration.

Hyperion installation is similar, after logging in via SSH – you’ll get direct root access with root password openelec – you need to issue in console:

curl -L --output --get
sh ./

Next please store your config file here:


That’s it!

How to uninstall

But what if we would like to return to boblight and uninstall hyperion ?

sudo /sbin/initctl start boblight

sudo /sbin/initctl stop hyperion
rm /etc/init/hyperion.config.json

SDR using Raspberry Pi: Tracking airplanes above our heads – recieving ADS-B data with visualization using DVB-T dongle

Raspberry Pi SDR


Note: There’s a newer version of this entry – updated with latest tests, much easier to install:

Last time I’ve shared with you the Raspberry Pi “computer for a buck”. Unless you’re are learning Python or playing Minecraft – or better – you’re already bored – I have a new thing fro you. It’s a very nice idea that you can use as your graduation or school project – and it’s all about tracking airplanes high in the sky. From hardware point – you will need a DVB-T/DAB USB dongle – quite easy to obtain and also – quite cheap. We will be aiming to build a very cheap platform to send data back to Flight Radar 24 (and for us too), which gives us premium access and increases coverage of this particular service. So what’s it all about ?

  • spotting – it’s basically taking photos of the airplanes (regular airlines) that are travelling at RNAV. To take a photo – you need to know exactly when they are gonna fly-by and you need to know who’s flying – where to, where from etc.
  • receiving radio signal – we need to receive a specially modulated signal that airplanes are sending and interpret it – I’ll get back to this
  • drawing on the map the up to date position of the airplane and sharing this over local network
  • you can also try to listen to classic FM radio
  • as well as CB, TAXI corporations chatter
  • tracking amateur baloons that go up high into stratosphere
  • if you live near the airport you can also listen to chatter just like does
  • basically listening to any radio from 50MHz to 2GHz, and demodulating digital signals
  • feeding FlightRadar24 with data and getting premium access

Continue reading SDR using Raspberry Pi: Tracking airplanes above our heads – recieving ADS-B data with visualization using DVB-T dongle

RaspberryPI – best & cheapest computer out there for everybody

pi-unbox There’s no doubt that non-profit organization behind, the $25  computer (well let’s just say $35 + some xtras) had a huge success and is the next big thing for every computer enthusiast. Raspberry Pi is a full blown computer based on the ARM  architecture  that allows to run different sorts of operating systems. Today we have a choice of many Linux distributions, and the one to start and one to stay with is the Rasbian, based on another famous Linux distribution – the Debian. This little computer is designed in a very smart way allowing you to display video both on Composite only monitors (just back when I had Atari ST in the ’90, and every other Atari/Amstrad/Commodore C4 or Amiga) but also HDMI output, that you can optionally configure to work with any screen. Most HDMI->VGA converters do also work just fine. Raspberry Pi is now shipped in few variants – the classic 512MB RAM in model B is only available as used (just as the A model, that lacked Ethernet port), but previously they had – A i B just 256MB RAM. Today as of 2015 we have still B+ and A+ models – redesigned to allow better power management and distribution as well as the factor of outputs. The flagship today is of course the Raspberry Pi 2 and 3 – 1GB RAM, four cores and backward compatibility, while the version 3 has also WiFi and BLuetooth (LE) onboard, and the cores have been updated to A53 1,2GHz, 64-bit.  To continue the sound is also being transferred over  HDMI, which allows for decoding – but also you can choose analog (it’s on the jack along with composite video). For multimedia player enthusiast – this device is AVC hardware-decoding capable – way up to 1080p with sound – but there’s not default MPEG-2 license – you can order it separately. The original A, A+,  B and B+ had a CPU horsepower comparable to old Pentium II 350MHz, but don’t forget that GPU is 1080p capable. Just to start Raspbery Pi offers: Continue reading RaspberryPI – best & cheapest computer out there for everybody