Posted on May 20, 2009 in Other Projects by John 1 Comment »

If you’ve browsed our git repository recently, you probably saw a new project called ACR120. A few months back I bought an ACR120U RFID reader/writer to try and find out what kind of data was stored on my student ID, and maybe.. you know.. make a copy of it for safe keeping. Anyway, it can read ISO14443 compliant cards like ever so popular MiFare Classic card, but the Linux support is pretty iffy out of the box. There’s a driver at least, so I started writing a SWIG wrapper and a high level python interface to the device. My ACR120 is locked up in storage until September — but if anyone else has one and wants to hack on it, by all means, check out the source and send me any questions you have.

EDIT: I’ve moved the ACR120 git repo to http://anomos.info/~john/

Posted on July 29, 2008 in Other Projects by John No Comments »

Frequently when I’m writing code I want to quickly find all references to a particular function/method/class/variable within the entire code base. Many IDEs provide this feature, but most of those programs are too bulky for me, I typically program in Vim or Gedit. So I wrote this bash script which greps all the files in the current directory for a specific term and pretty prints the output with filename and line numbers. It lets you limit your search to files with a specific extension with the -e option, or a different directory with the -d option. Anyway, this is all very simple, what I want to talk about is running this straight from Gedit with a single key press and getting sexy output, like this:

Running tool: GrepAll
 
./Connecter.py:
352:            self.encoder.add_neighbor(self.id, AESKey(key, iv))
356:            self.encoder.add_neighbor(self.id, self.tmp_aes)
 
./Encoder.py:
154:    def add_neighbor(self, nid, aeskey):

Right there in the bottom pane.
(more…)

Posted on May 18, 2008 in Other Projects by John 3 Comments »

Here’s an 8×8 LED matrix display that I built and programmed to play out randomly generated boards of Conway’s Game of Life:

While I was waiting for the parts to arrive I wrote a little python version that should run on just about any computer assuming python and pygame are installed. The program will display a square 40×40 toroidal game of life board by default, but it can take a command line argument to make it NxN (ex: python conway.py 8). There are plenty of other very nice game of life implementations out there, much faster and more featureful than this one, which I highly recommend if you’re interested in learning about this cellular automata.

Now, about the hardware version.
The source is available, and if you’re interested in building one there are tons of circuit diagrams online for driving an 8×8 LED Matrix (like this one). It’s a fun project and definitely easy enough for beginners (I have virtually no electronics experience, and this is also the first time I’ve ever programmed a PIC).