Category: Code

Raspberry Pi powered sub-site

A Raspberry Pi powered sub-site hosting a DIY music store

RasPiBoard V2

…and that includes a Ðogecoin music store, coming soon!

Check for more.


First ever Raspberry Pi Jam (the Netherlands)

September 26th was the first ever Dutch Raspberry Pi Jam at Ordina


Short version: Raspberry Pi & Arduino-fest 2013. Embedded systems and micro-controllers everywhere!

Longer version: Gert van Loo was there, known from the Gertboard, telling us about the process of how the Raspberry Pi came to be. There were (quite a few) representatives from Bitlair, a ‘hackerspace‘ located in Amersfoort, (edit:) and Rev Space located in The Hague (/edit) showing their awesome hacking skills. Like this old military telex connected to twitter showing all the tweets hash-tagged #RasPiNL. Awesomely steampunk, don’t you think?

Tim Becker was a speaker who gave a presentation about Anykey0x. What is Anykey you ask? One button to rule them all! Need a designated “ë” button on your keyboard? This button provides! .. Well, that’s how it started out and it has grown out to be programable micro-controller similar to Arduino, but much simpler in it’s premise, yet it’s a little faster so it should be able to do a little more. And I for one like it’s noob-friendly features: You can’t brick the little device by writing bad code, cause the boot-loader is written in ROM! Thank you Tim! So I decided to get one myself. A few examples of what you could do: Make a joystick track your mouse-pointer, run midi-commands (OSC would work as well but beware, check the maximum binary size!) or make led’s blink (…duh!). With some work you could, as far as I’ve understood, make a working audio interface out of it which could perhaps provide the Raspberry Pi with a better audio output then the current build-in one. A device this small could easily be patched onto the RasPi. I did mention it was small right? Well, this is what it looks like:

And last but certainly not least was Jeremy from Autostatic who gave a live demo of what the Raspberry Pi can do using real-time audio software. Using (Debian) applications like Samplv1 and a virtual guitar-effect box playing live guitar. Jeremy has done a lot of work to get audio software like Jack running with low-latency and has build applications from source for the Raspberry Pi’s ARMHF CPU architecture, sometimes working together with the coders of the original source to get things working. Most if not all of his work on the Pi can be installed via the audio repository he is maintaining. To install the repository on your Debian (Raspbian) system head on over to, and follow the procedures. From there you can look up all kinds of useful audio-applications like Synthv1, Non-Sequencer, and much, much more!

All in all it was a great day, and there was just too much to sum up here. Like a robot playing chess, pi-cameras making time-lapse images or providing an easy way to tweet your new hairdo , there was even a programming workshop to get you started with the Scratch programming environment. I think this day inspired many new projects and I hope we can see more innovative workshops, seminars and conferences like this. And for that we thank Ordina for hosting this event. (Hopefully,) see you at the next one!


Automatically mount a NAS, at boot, on a Raspberry Pi

Cyborg by Son of 8-Bits, on FlickrNow that I am able to control the Raspberry Pi with Synergy, as well as via SSH from another computer on the network, I’d like my multimedia files (music, movies, etcetera) to be readily available to me on the machine. XBMC/OpenElec has neat little GUI’s and even an on screen keyboard to configure your local shares, but Raspbian does not. So we’re gonna mount a NAS via CIFS (or any other CIFS compatible share, like SMB, known as Samba) so I can get to my files.

We’re starting at your home folder (YOUR_USER, pi by default)

$ cd /home/YOUR_USER/

Again, the default username is pi.

$ mkdir NAS

Or any other name you’d like the Folder containing your shares to have. You can use this new folder to mount the NAS, meaning the shared files’ll appear right here. But I made sub-folders because my NAS has multiple shares. If you’d like to make multiple mounts as well, enter:

$ cd NAS

Or the name you picked in the step before this one. and enter:

$ mkdir FOLDER

Name this new subfolder whatever you like, I went with the same name as the shared folder on the NAS so it’ll be easy to recognize. The name of the shared folder on the NAS is the same as SHARED_FOLDER in the text you’ll have to enter below, but first enter:

$ sudo nano /etc/fstab

This file we’ve opened and are about to edit is the file which tells the OS (Raspbian) to mount these shares as soon as you boot/login. (Sidenote: I’m not sure at which point this happens, as I’ve set my Raspberry to boot straight into the Desktop environment, LXDE.)

Go past whatever text is already there and enter the string of data below, don’t forget to edit the CAPITALIZED text to match your info. (Olawd, that rhymed!)


For IP_OF_NAS you can also set the name of the computer, which is also it’s domain name. If you don’t know what this is, ignore it and make sure the local IP of the NAS is correct. The SHARED_FOLDER is the shared folder we’re trying to mount.

Satellite dish by Son of 8-Bits, on FlickrIf you have your NAS set to accept any connection (shared folder-wise) without authentication, you can enter “guest” as the username and leave the password empty. This should work, but is however untested as I’ve secured my own NAS. You can always enter the admin username and password of the device, if you the credentials.

If you’ve entered this correctly it should automatically mount the shared folder(s) on the next login/boot. When you enter the folder(s) we’ve made earlier the files (and folders) contained in the share will appear as if they’re right there on your Raspberry Pi! But in fact it’s still just the NAS. Now you should be able to use these files in your applications. Please note: I can’t delete or edit files unless I use a sudo command, this might be different for you depending on your NAS and it’s configuration. Anyway, if you’re ready to try this auto-mount thing out, reboot the Raspberry Pi by entering:

$ sudo reboot


Running Synergy on Raspberry Pi (Raspbian) at boot

So we’ve got our little Lego-encased RasPi up and running…


After getting the Debian installation (Berryboot, Wheezy 5/’13) up and running he 1st things I wanted to achieve were to change the username of the Pi, make it boot straight into the desktop environment again after a reboot, and to start running a Synergy client so it automatically connects to the Synergy server on my Mac. After searching for a long, long time on google and trying numerous ways that wrecked X11 beyond repair (forcing me to reinstall Raspbian), I found the answer accidentally while looking through the files in the LightDM folder. So if you too are still looking for this, here’s how incredibly simple it is.

In the terminal type:

$ sudo nano /etc/lightdm/lightdm.conf

Search for this function:


And change the ‘pi’ entry to whatever username you are currently using, so it looks like this:


Press ‘ctrl+x’, ‘y’ to confirm you want to save, and the enter button to confirm. You’re done! The Raspbian installation will now automatically boot into the desktop with your username logged-in.


Next, I wanted to run Synergy on the Raspberry Pi. With Synergy you can share a keyboard and mouse across multiple computers, no matter what operating system. It looks and works just like having multiple screens connected to one computer, and it’s awesome! Luckily, there’s already a build for our RasPi flavour of Debian. So, lets start-off by installing Synergy, if you hadn’t already:

$ sudo apt-get install synergy

Wait for it to complete installing. Next we’re gonna make a file to tell Synergy to start at boot when X11 starts. Enter the following three commands into the terminal:

$ cd /etc/X11/Xsession.d
$ sudo touch 12synergy
$ sudo nano 12synergy

In this empty file that just popped-up when you enter the ‘nano’ command, paste the following:

/usr/bin/killall synergyc
sleep 1
/usr/bin/synergyc –daemon –restart –name CLIENT_NAME SERVER_IP_ADDRESS

CLIENT_NAME is the name you want to send to the server for identification and SERVER_IP_ADDRESS is, what else, the server’s local IP address. Press ctrl+X to quit the nano editor, press “Y” to save your changes and the enter key to confirm. Next we’re gonna give this file executing rights, by typing in:

$ sudo chmod +x 12synergy


Credits for this go to this blog, except that the 2nd part of that tutorial doesn’t work for me cause there’s no gdm to be found on the Pi! So I did some digging around in the files (finding the auto-login solution above in the process) and here’s what needs to be done:

$ cd /etc/X11/
$ sudo nano Xsession

In this file, scroll all the way down to the last ‘fi’ and type/paste the following before ‘exit 0’:

/usr/bin/killall synergyc
sleep 1
//usr/bin/synergyc –daemon –restart –name CLIENT_NAME SERVER_IP_ADDRESS

ctrl+x, y, enter. And you’re done!! Again, CLIENT_NAME is the name you want to send to the server and SERVER_IP_ADDRESS is the server’s IP address. On the next reboot synergy will automatically run, and if you configured both the client and server correctly, will connect right away! If you’re ready to try this out, end with the following command to reboot the Raspberry Pi.

$ sudo reboot

 EDIT: I was originally planning to do a VNC tutorial on this blog as an alternative to using Synergy. However, the ‘how to’ provided by Adafruit couldn’t be any easier. They show you how to install and run VNC, but also how start it at boot the easy way. So if that’s what you’re looking for, head on over to ‘Running VNCServer at startup‘.

Edit 14/12/2013: Adafruit has also released a tutorial about installing Synergy on the Raspberry Pi. Which takes the approach of having it boot with the desktop environment by utilizing the autostart features of lxde at user-level. The tutorial includes building Symergy from source which might be daunting for some user, but it’s very educative nonetheless. I reckon using apt-get like in my tutorial’ll work fine as well, so if the source-code part scares you, try that instead.
Setting up a Synergy Server‘.


Raspberry Pi (and Lego case)

Gadget and geekery galore!!!

Raspberry Pi Lego Case

I got my greedy little hands on a Adafruit Raspberry Pi!! The $35,- computer which you can mod and hack into all kinds of dedicated machines. And I’ve already made a custom case for it, pictured left, using Lego. If you wonder what all this stuff is; Underneath is an external HDD, attached via USB, which I encased with lego as well. The little house like structure in the middle is the Raspberry Pi itself and on top is a (wireless) router. Not the most charming part of the building, but it saves me space in the studio.

I’m currently running Raspbian (Debian) and Openelec XBMC, modding and hacking the operating systems to taste. So expect further posts with mods and hacks to make your Raspberry installation and configuration as easy as pie (rimshot, clash!).

On that note, welcome to a new category on Code! As a token of my appreciation, here’s a small spoiler: I’m also working on some Android applications which’ll appear in this category soon enough.

More soon!