h1

Planning ahead

November 24, 2014

The Adafruit accelerometer did not arrive in time for my birthday and I really wanted to wear my ring to my party. I went to RadioShack and got a small momentary pushbutton. I charged my 50mAh battery, clipped the leads and used tweezers to coil the stripped wires around power and ground. A few more tiny wires and it was working.

I wore my ring several times over the weekend. It was pretty functional and didn’t need charging (yay for sleep mode!). The wires were a little fiddly so if I took the ring on and off or handed it around, sometimes it would reset and be flaky but pushing the ring blank back on usually fixed it.

As I was passing it around or fixing it or just playing with it, someone asked if it could do Magic 8 Ball instead of vocabulary and down the rabbit hole I fell.

With a button, well, it can only do one thing. But the accelerometer identifies (interrupts on) taps, double taps, and portrait/landscape changes. It can also do thresholds so I suppose it would recognize punches as well (air punches! real ones would definitely break the wiring!).

Right now, I have 200 words, some of the definitions are poorly formatted, there are only 60-ish characters allowed so if the definition is longer it gets cut off. I tried to prevent that but the cutoff is probably 62 instead of the 66 I used so a few definitions are missing the last bit. However, with the 130 GRE vocabulary words and the 70 strange wordnik words, it is a fairly amusing mix.

MicroView ring

 

For some reason, though, the ring really likes the word ‘turpitude’ (which means depravity or wickedness). The randomness is working well except for that word coming up more often than I’d expect. I’m trying not to read anything into it.

Anyway, I still have about 5k of flash space. Magic 8 ball responses will be easy, they are small. It can do a portrait/landscape interrupt as I turn my wrist around so I’ll put up “Think of a question!” and then another turn back and forth (P/L interrupt) will get the random yes/no/maybe response. Though really, a tap or double tap might as well get the response.

But, what should it do with a double tap? (I just thought up a punch so I’m going let that percolate a bit.) My husband asked if the ring could play pong, using the angle of the ring to move the paddle I thought about that and found that someone has already done that work for me (video!). I only need to replace their pot with tilt sensing.

After getting a little frustrated with trying to make the state machine work from inspection, I decided to stop doing that thing where I don’t apply professionalism to my personal projects. Thus, I made a flowchart to decide how it will work.

flowchart

I need UPS to arrive with the accelerometer so I can test the implementation of this mini-beast. In the meantime, I probably should make a few more ring blanks, these are all probably a bit small to work with the accelerometer and the battery.