Led lighting

Submitted by patrik on Wed, 2009-04-22 09:41

One of my most interesting projects is to remove as many of the conventional bulbs as possible and replace them with led-based lighting, some home-built and some bought.

Nice led calculator:

D-bus programming

Submitted by patrik on Mon, 2009-04-06 21:06

Some experiments with D-bus programming. Goal is to control and get info from the mediaplayer VLC.

A script to get the songinfo from VLC:

while [ 1 ]
info=$(dbus-send --print-reply --type=method_call --dest=org.mpris.vlc /Player org.freedesktop.MediaPlayer.GetMetadata $@|grep variant|grep string|sed 's/^.\+"\(.\+\)"/\1/'|grep -v http)
echo $info $dt
echo $info-$dt > /home/patrik/vlcInfo.txt
sleep 10

The text is printed to vlcInfo.txt and then used by a screensaver that shows the info. VLC must be launched like "vlc --control dbus".

Ubuntu, ELM-327 ODB-II and Scantool

Submitted by patrik on Mon, 2008-10-20 18:12

Some notes about using the ELM-327 ODB-II scanner with the Scantool software in Ubuntu.

Install Allgro dev lib and texinfo:
apt-get install liballegro4.2-dev texinfo

Download Dzcomm: http://dzcomm.sourceforge.net/

cd dz099i
sudo chmod +x fixunix.sh
make install

Download Scantool source. Unpack and make like this (from http://www.scantool.net/forum/index.php?topic=2672.0;prev_next=next):

make DEFINES="-I ../dz099i/include -DDZCOMM_DJGPP -L../dz099i/lib/unix -lm -lXpm -lXxf86vm -lXcursor -lpthread"

ln -s /dev/ttyUSB0 /dev/ttyS4

Linux and Atmel processors

Some notes about programming ATTiny25 and likes with an Ubuntu system.

Open Source soft and hardware, relativly cheap.
lsusb gives:
Bus 001 Device 034: ID 03eb:2104 Atmel Corp. AVR ISP mkII

Programming software - avrdude. use 'man avrdude' to see possible options. In my case an ATTiny25 was used.

id = "avrispmkII";
desc = "Atmel AVR ISP mkII";
type = stk500v2;

t25 ATtiny25
m168 ATmega168

(see "man avrdude" for more)

This gives the following command: