Category Archive for Perl

Plugwise gateway on NSLU2

I’m using some Plugwise circles to control various devices around the house. A few lights and the amplifiers of my SqueezeBoxes are automatically switched on and of as required. To couple this with MisterHouse, I built an NSLU2-based gateway to the Plugwise ZigBee network.

Read the rest of this entry »

Garmin simple text convertor script

I needed to test some XBee long-range radios. Hmm, how can we make this test useful and fun at the same time? Well, let’s put one end of the radio in the lab connected to a computer, and wander around with the other radio while transmitting the current position obtained from a GPS.

Using the XBee evaluation kit, my (t)rusty eTrex GPS, a 12V battery and some cables, the hardware was quickly in place. Now, what to transmit over the link? Full NMEA? Hmm, maybe this is a bit overkill. Sending the position once a second ought to be enough. But then I need a microcontroller between the GPS and the radio to reformat the NMEA into simple position beacons. There has to be an easier way…

Read the rest of this entry »

Perl vs career

No comment ;-)

Writing out a decimal value as a hex string

A function to convert a decimal value to a hex string.

Read the rest of this entry »

File decimater

A simple script that allows to strip a certain file by retaining only a subset of the lines of the original file.

Usage:

 dcmate <inputfile> <lines_to_skip>

There is also a trivial graphical interface to the tool, called ‘dcmatex’. Put the file in the same folder as the ‘dcmate’ script. It requires the Perl::Tk module.

Download: dcmate

Download: dcmatex

Outlook calendar event generator

This script will generate a list of events that can be imported in your Outlook calendar. Comes in handy if you work in shifts that are not week-aligned.

You can enter the events quickly in a graphical representation of the days of a specific month. The idea is that you first select a ‘shift’ and that you then click on the days that should be assigned the selected shift. The buttons in the calendar view will change color to reflect the new shift.

Once all events are entered, the Outlook import file can be generated by clicking the ‘generate’ button.

The GUI looks like this:

Download: caltool

Read the rest of this entry »