Archive for the ‘raspberrypi’ Category

No Comments

How to Make the Music Player Daemon (MPD) Autoplay on a Raspberry Pi

Tuesday, November 13th, 2018

Music Player Daemon (MPD) is a terrific open source music player and maintains a good organized library of your music in an efficient database. MPD is a server so you need a client. That can be your laptop, to your phone, your browser, your whatever, or you can run a client on your Rpi locally (mpc). Or all together.

It does run fine on the cheapest raspberry pi, so your ready to go for 5 euro. The Pi only has a high quality HDMI output, for older Hifi systems with analogue connections  you need something like the HifiBerry.

MPD uses much less CPU then running Kodi, 4% instead of 40% on the original Raspberry Pi.

Furthermore you can put your music on an external USB stick or  NAS with Linux NFS or the slightly inferior Microsoft Windows Samba shares.

If you haven’t installed MPC yet, do that first:

sudo apt install mpc

Normally MPD will resume play after shutting down, but to make MPD auto-play always simply add this to your systemd.service  file:

ExecStartPost=/usr/bin/mpc play

How to do that? Just edit the file:

sudo vi  /etc/systemd/system/multi-user.target.wants/mpd.service

And add it under the line starting with `ExecStart`

...
[Service]
EnvironmentFile=/etc/default/mpd
ExecStart=/usr/bin/mpd --no-daemon $MPDCONF
ExecStartPost=/usr/bin/mpc play
....

Save it, stop MPD, and reboot your pi. And the music will play 😉

23 Comments

How to run or boot Raspbian on a Raspberry Pi Zero without an SD-card.

Thursday, March 22nd, 2018

In an earlier post I explained how you can run and connect to a Raspberry Pi Zero with just an USB cable. Still the RPI Zero was using a micro SD card.

Luckily the great minds of the Raspberry Pi Foundation developed new boot modes: ethernet boot and USB Mass Storage Device (MSD) boot for the Raspberry Pi 3.

Now they came up with USBBoot, a tiny program that pushes the bootcode over the USB to the Raspberry Pi Zero (Raspberry Pi model A, Compute Module, Compute module 3 and Raspberry Pi Zero and Raspberry Pi Zero W), so it can boot without a micro SD-card.

Boot a RPI Zero from your laptop without SD card

In this post we will boot the Zero with the latest Raspbian Stretch (lite) from an common Ubuntu laptop, running 16.04LTS. It is surprisingly comfortable once you’ve set it up. And remember we’re running the Zero without any SD card, which costs are higher then a Raspberry Pi Zero. You do not need an SD card at all.

Yes, we use a standard USB cable to power,  connect, provide internet-access, an OS and storage for the Pi Zero.

So we gonna run the poor Raspberry Pi headless (=no monitor), armless (=no keyboard or mouse) and brainless (=no memorycard). And you know what? Back to the basics make the little gem shine!!

(more…)

6 Comments

Connecting to a Raspberry Pi Zero with just an USB cable (II)

Monday, October 2nd, 2017

This tutorial assumes you’re using Raspbian Strectch, and a Linux (16.04LTS) laptop, but it should also work on Raspbian Jesse for the Zero and any Linux Laptop. So it’s for everybody. Nearly every laptop can run Linux freely, (that’s not the case with Windows (Microsoft) or MacOS/OSX (Apple) that’s paid and not free software). You can always run Linux in a virtual machine, if you’re afraid to dump proprietary stuff or install Linux side a side.

In part 1 we explained how you can connect to a Raspberry Zero computer with an ordinary USB cable to power, connect (SSH) and provide internet access for the Pi with higher speeds than most WIFI connections.

That’s all been made possible with the smart USB OTG functionality that enables the Pi Zero to switch USB host/device mode and mimic an ethernet device (or webcam, or keyboard).

We showed you how to connect from a Linux laptop to the Pi by setting the connection type to Link-Local only. (more…)

3 Comments

Connecting to a Raspberry Pi Zero with just an USB cable (I)

Monday, October 2nd, 2017

The goal of this post is to explain how you can power, connect  and share internet with your Raspberry Pi Zero from your laptop with just one USB cable. After you’ve set it up correctly, connect the cable, let the Pi boot,  ssh to your Pi with this simple command ssh pi0 or update your pi with this oneliner ssh pi0 "sudo apt update && sudo apt dist-upgrade -y".Your Raspberry Pi Zero will have internet access over USB with higher speeds than most WIFI connections. (more…)