Slug as an mediaplayer

Just some notes, see http://www.nslu2-linux.org for more. The idea here is to have the Slug playing a audiostream, which contents are controlled by a server (where the media files resides).

-The Slug runs a media player software (mpd) that's set to play a stream from a local server

-The server runs Icecast, which in turn are fed from mpd.

-By changing what mpd and the server is playing the Slug plays different music.

To play another location:

rm mpd_playlist # Remove playlist link

Bad caps

Bad capacitors can make any electronic device malfunction in strange ways. They are easily detected:

More info here:

mikroC and the DLR3416

Some example code for mikroC, PIC16F73 and the 4-digit display DLR3416.

Uses extosc @ 20Mhz.

A0-A1 : RC0-RC1 (address, 1-of-4)
WR : RC2 (write pulse)
D0-D6 : RB0-RB6 (7 databits)

Inspired by Jan-Erik Söderholms asm-code for DLR3416

void toggle_wr();

#define DLR3416_A0 PORTC.F0
#define DLR3416_A1 PORTC.F1
#define DLR3416_WR PORTC.F2
#define DLR3416_DATA PORTB
#define led PORTC.F7

void main() {

char pos = 0;
char Char = 0;



Fast booting Linux PC

This is a little project to create a fast booting Linux PC. As usual it will as long as possible use parts that I have lying around, I don't like to buy things if I already have usable parts.

The use for the PC is mainly as a TV, and as we only have digital broadcasting in Sweden DVB support is crucial. The components to be used are:

  • Mainboard - a small 17x17cm from an old Thin Client. Has 4x USB, tv-out and some more goodies.
  • PSU - Modified ATX with a 12cm fan which doubles as CPU fan.
  • 256 megabyte RAM

SciTE tips

SciTE is a nice free multiplatform editor, mostly for coders. It's a bit tricky to configure though, so here are some hints.

1/ PHP-files as source
When you click 'Open' and the file open dialog is shown there is a filter activated to only show source-files. This filter doesn't include PHP files, which is bad for me :)
The solution:
Start with making the global configuration file writable:

sudo chmod 777 /usr/share/scite/SciTEGlobal.properties

Next, open the file in SciTE by choosing Options/Open Global Options File. Find the filter settings:

Simple good looking USB-display

A simple 20x4 HD44780-based display. Modified with a USB-Pic to be connected to a PC's USB-port. Circuit described here.

Heat controlled fan

A fan that will be mounted in a ventilation hole. If the temperature rises over a limit the fan will start and run until the temperature is under a certain point. Although the fan is extremely quiet a LDR is used to keep the fan quiet at night.

Status: Has been running without problems for two years. The fan is so quit and nights can be hot so the LDR is not used.


Code (for mikroC):

#define fan GPIO.GP5

int potTemp, potTime, light, temp;

long int delayTime;

void main() {

My Slug

The Slug is a little NAS-device that can be tweaked to do almost anything. This is a presentation my Slub and what is does (and will do in the future).

Operating System
Debian Arm installed on a 40Gb, 2,5" harddisk connected via USB

Instead of the built in ethernet I use a DLink DWL-G122 wireless usb adapter.

Internet radio
This is the main usage for my Slug. It plays some stations with MPD, some with VLC from a local server.

Light control

Syndicate content