davy
07/19/11

Project jGPX

I was going to call the project "jGPS" (you know, GPS with prefix 'j'), but my clumsy typing decided otherwise. Besides, X-es are always cool, right guys?

On September 10, J-man and M-woman are getting married. As is usually done around here, there is a bachelor day/night/party/zweinerei (stag day/night/party/something for the British gentlemen) being held on August 6. Before going bananas on Trammelant at night, J-man must fulfill a list of difficult challenges. I can't tell anything about those challenges (I've sworn secrecy, obviously), but I can tell you about what we are going to use to tie the thing together (like what a nice rug does to a room): jGPX.

J-man will receive a GPS-enabled device that tells him what to do. It will guide him between challenges by means of a bearing and a distance, and he must get at his destination in time. On those locations, he will obtain the challenges.

We have the following in mind: We create the routes and points of interest in Google Earth and add the challenges and timestamps as descriptions. This place (GE terminology) is saved as .kml (actually XML) and transformed (by means of XSLT and such) into C-code (data actually) that is to be compiled for a microcontroller, most likely an Arduino or compatible.

FYI: "we" is Chris Pockelé and myself.

MPDTagAutoplay implements a loop that fills and purges an MPD play queue
automatically. New songs are chosen randomly from a set of files tagged
with a certain label. The song history is trimmed to a preconfigured length.

Currently these labels are stored in separate files along the client
i.e. this program. It would be much better if the tagging was implemented
by using the sticker functionality of MPD. However, currently (MPD version
0.16) does not support tagging directories, something I need for integration
into MPDXML. I hope to change this someday, effectively storing the tags on
the server, instead of client-side.

For now, tags can be manipulated with tags.py, which provides an interface
to both the user and MPDTagAutoplay itself.

Usage:

./mpdTagAutoplay.py <tag>
./tags.py {tag|untag} <tag> <file(s)>
./tags.py {tagdir|untagdir} <tag> <dir(s)>

Example:

./mpdTagAutoplay.py jazz

auto fills the play queue with files that are tagged with "jazz". Nice.

./tags.py tag jazz "music/Louis Armstrong/*.mp3"

tags all mp3 files in "music/Louis Armstrong" with "jazz".

Download MPDTagAutoplay (python package)

davy
01/22/11

IRtimer

Not content with the old IR code in my TI-92 remote project, I implemented an asynchronous "Arduino" library for sending infrared codes: IRtimer. As the name suggests, this library uses the Atmega timers to generate the modulated 38kHz carrier.

An IR code is sent by calling IRtimer::queuecode with the timing information (struct *ircode), the code to send, and a callback function as parameters. This method returns immediately, unless there is no space left in the transmission buffer. In that case, the callback function is called, in which the caller can do whatever he wants and even cancel the transmission if necessary.

More information on the trac of the TI-92 remote project.

davy
11/21/10

TIlink

In an attempt to create some order in the TI-92 remote project I've been working on, I distilled some of the code into an Arduino library. The result is TIlink: a library to interface with Texas Instruments calculators like the TI-92; other models that use the same protocol (I'd guess TI-83, etc) should also work.

It is actually a fairly naive implementation for a very simple connection (based on the parallel link), but it seems to work quite well.

davy
11/15/10

MPDXML

I've been working on a client for MPD. It's a small daemon written in python that provides an XML-interface to MPD. It can also host static files such as XSL-files and images to convert the XML into something nicer.

The XML interface on its own can be used for e.g. widgets running on mobile phones. Additional files (xsl, js, ...) are provided to turn the bare XML into an AJAX web interface for compatible browsers. Not much intelligence is needed in the python backend; most of it can be implemented client-side. Since talking to MPD is done through python-mpd, mpdxml.py is a relatively small file.

playqueue

Available on http://publictrac.natox.be/trac.fcgi/mpdxml/wiki (warning: bleeding edge)

<< 1 2 3 4