Stokes' ProjBlog

A journal documenting innumerable, mostly terminally in-progress undertakings. Nerdiness abounds.


Buttoning down security November 1, 2015

Filed under: Miscelaneous Projects,New project! — Stokes @ 3:41 pm

iButton Reader 2My employer recently rolled out new security policies, including stricter requirements for passwords. As often the case, strong passwords using the new scheme can be a bit difficult to remember, and the unnatural mix of symbols makes them slow to type. A system with less strict password rules paired with a physical key (the “something you know/something you have” combo) would be more secure and convenient, but it is usually something that needs to be rolled out at a company level. I came up with a compromise.

iButtons are kind of a cool technology, albeit one that never made it out of certain niche markets. Basically, iButtons are 1-Wire chips in ruggedized packages similar to coin cell batteries. They only need two connections — combined data/power and ground — so the battery form factor works well. iButtons have unique 64 bit IDs and can join a 1-Wire “MicroLAN” with just a touch to a reader. I’ve had an assortment of 1-Wire and iButton hardware for a long time but never found a good use for it… until now.


“STAND BY FOR MIND CONTROL!” October 29, 2013

Filed under: Miscelaneous Projects — Stokes @ 8:02 pm

MindFlex to Serial to USBA couple of years ago, I bought a toy EEG reader: a Mattel MindFlex, one of several that use the same NeuroSky chipset. Toy it may be, the tech at its heart is really quite remarkable. I have a vague understanding of how it works, but that just makes it seem even more like magic.

The NeuroSky module itself generates 9600 baud serial data. The MindFlex headset transmits wirelessly to a base station, but the data sent has been heavily munged; I assume this is because the transmitter module they use is slow but cheap. I hacked the hardware shortly after I got it (adding a little chassis-mounted 3-pin socket to access the chip’s serial output, the battery, and ground), but for one reason or another, I ended up forgetting about it until recently.

So far, I’ve created a Python library for handling NeuroSky data; it’s on github now. I’ve also turned the headset into a Bluetooth device. I’ll post more about that later.


Hanging on the Telephone, Part 2: the Code September 26, 2013

Filed under: Miscelaneous Projects — Stokes @ 3:05 pm

Rotary Dial w/ DigisparkTurning a rotary telephone dial into a USB device was easy. As I (re-)discovered, the dial is basically just a pair of switches: a normally-open ‘dialing’ switch, which closes while the dial is in motion, and a normally-closed ‘pulse’ switch, which opens and closes the same number of times as the number dialed. All I needed to do was count the number of pulses that occur while the ‘dialing’ switch is closed, then send a USB keypress event based on that number when the ‘dialing’ switch opens again.

I used a Digispark for this project, so the code reflects a few of its oddities. In order to cram software USB emulation onto a tiny microcontroller and still leave room for user code, they had to make some compromises. There are no interrupts available, and their own version of the delay() function needed to be used to keep everything in sync. The hardware side is also a little odd: because the Digispark’s main header doesn’t provide a ground connection, I just set one of the digital I/O pins LOW and used that. This seemed like a hack at the time, but I later saw this technique on one of Digistump’s own lists of power user tips, so I don’t feel so bad.


Hanging on the Telephone September 25, 2013

Filed under: Miscelaneous Projects,New project! — Stokes @ 2:04 am

rotary-dialWith the Atari keypad working, I want to adapt another old input device to work with modern machines. I’m going to set my sights a bit further back this time.

When I was in my single-digit years, I was given a broken telephone to play with: a standard Bell desktop model with a rotary dial, nearly identical to the other phones in the house. I discovered that a flashlight bulb and battery could be wired to the dial so that the bulb would blink when a number was dialed. Not just blink, I noticed: blink the same number of times as the number dialed. I also noticed that the bulb was normally on, and would wink off when dialing — the opposite of the way I expected a switch to work. These observations lead me to discover that a real phone could be dialed by quickly tapping the switch hook. I suspect I dialed a few wrong numbers during my research, but I was so thrilled by my discovery that I can’t remember them now. I may not have noticed them then, either.

My new project: create a USB rotary numeric ‘keypad.’ I know this has been done before, but as a tribute to my early experiments, I’m going to do mine without any research from the ‘net. This will be a purely experimental venture.



Putting the Broken in Breakfast July 20, 2013

Filed under: Miscelaneous Projects — Stokes @ 5:38 pm

A couple of years ago, I was part of a team that attempted to build a Rube Goldberg-style breakfast-making machine, part of the Take On the Machine hackerspace challenge. I posted the two Artisan’s Asylum segments, but the site that originally hosted the videos appears to have dropped them. Today, I rediscovered the videos on YouTube!

See the videos now!


Introducing MusicMover! July 15, 2013

Filed under: Miscelaneous Projects,New project! — Stokes @ 2:17 pm

MusicMoverThe situation: I wanted to keep the music collection on my phone fresh. I use iTunes since I have a Mac and an iPad, but my phone is Android-based. This wouldn’t be a problem if my phone had enough storage for my entire library — I’d just copy everything and be done with it — but I have many times more music than my phone has space. iTunes will do some stuff to randomize the subset of music on an iOS device to fill available space, but there’s no simple bridge to Android.

The solution: MusicMover. I put together a moderately simple Python script that reads the iTunes library XML and copies tracks (to a specific total size or minimum free space) to my phone when I mount it as a USB drive. It doesn’t just copy, though: it replaces (by default) a third of the music already on the phone with fresh tracks.

It’s a fairly bare-bones, but it gets the job done. As it stands, it’s a command-line utility, with an optional Tk progress bar display. Since it may be of use to others, at least as a starting point for their own projects, I’ve put it on GitHub. I’d like to see what other people can do with it.


Junk Box DrawBot June 13, 2013

Filed under: Miscelaneous Projects — Stokes @ 2:59 pm

Junk Box DrawBot, Front (?)Someone in the Introduction to Arduino class I teach at Artisan’s Asylum asked me what could he actually do with the knowledge and materials I supply. As an answer, I built a robot, using materials from class and random parts in my junk box.

It took maybe 90 minutes to construct, nearly half of which was simply rooting around for just the right part. I might have done it in less time if I’d used proper tools; all I used was a power drill, a nibbling tool, and a needle file, things I had readily available at home.


A real pain in the neck September 5, 2012

Filed under: Miscelaneous Projects — Stokes @ 1:12 am

Quick-and-dirty laptop standI’ve been working on my laptop on the couch quite a lot, and it’s started to cause me real problems. I’ve been getting intense ‘thunderclap’ headaches, and they appear to be a posture-related injury: slouching on the couch, looking at something in my lap has done something awful to my neck. To improve things, I’ve started spending my day working at Artisan’s Asylum, where I set up on one of the electronics shop benches. That’s better, but looking down at the screen is still aggravating my neck, so I put together a quick-and-dirty laptop stand out of yet more scrap wood and junk bin hardware.

The sides are part of an IKEA spice rack, and the other metal parts are server rack-mounting hardware. Thumbscrews on either side permit adjustment of both the height and the angle.

My neck is already feeling better.


I gotta gotta gotta gotta Kinect June 13, 2012

Filed under: Miscelaneous Projects — Stokes @ 9:52 pm

Kinect standMy Xbox 360 unceremoniously died one night, leaving the fate of New Vegas and the whole of the Mojave Wasteland hanging. My initial attempt at reflowing the solder, despite using the proper equipment, was an abject failure. Admittedly, I didn’t try as hard as I could have; I’d been coveting a Kinect for a while, and I finally had an excuse to get one cheap as part of an Xbox bundle. Say what you will about Microsoft, but the Kinect is a cool piece of hardware.

I didn’t originally intend to use it as a video game controller, but since it would take some time before I got it set up for hacking, I wanted to try it out. That required finding a place to put it that was high enough and — to work in my narrow living room — also as far back as possible. If this were the olden days, I’d have put it on top of the TV; here, in the future where TVs are thinner than they are tall, that isn’t an option. I’d have to get more creative.



Coffee to go May 9, 2012

Filed under: Miscelaneous Projects — Stokes @ 8:28 pm

New coffee table baseMy coffee table has a history, or at least its top does. When he was half my age, my father worked in a department store; there, he picked up a nice piece of plywood from an old window display. It, as a coffee table, followed him through grad school and eventually to his first professorship in the Pioneer Valley where I was born. My mother used it (with a different base) as a slide for me as a baby. I remember first eating Chinese food for the first time off of it. When I was in junior high and high school, the surface (with another base) bore witness to many Dungeons explored, Dragons slain, and liters of Mountain Dew consumed. The table (with yet another base) was the first piece of furniture in my first place after college. hen I moved to the Boston area to continue my career in the game industry, it came with me.

But now, its base is disintegrating again. (more…)