Archive for November, 2014

h1

Seven

November 28, 2014

I got to thinking about Thanksgiving as a holiday devoted to eating (though, thanking is sometimes considered, let’s be honest about the true tummy extending form of the holiday). That got me to thinking about gluttony and wondering if we had holidays devoted to all seven deadly sins.

Wikipedia says Dante’s Divine Comedy lists the sins as

  1. luxuria (lechery/lust)
  2. gula (gluttony)
  3. avaritia (avarice/greed)
  4. acedia (sloth/discouragement)
  5. ira (wrath)
  6. invidia (envy)
  7. superbia (pride)

Lust is obviously St. Valentine’s day. That’s easy. Gluttony is Thanksgiving.

Greed? Hmm….

Oooh! Sloth is Labor Day! Actually, I think April Fool’s Day is the best match for sloth/discouragement. While normally the gags are funny, they are often deceptively discouraging.

Wrath? I think maybe Halloween, though that really depends on tricks or treats.

Envy, I would say would be Christmas. Is anyone ever truly happy with their presents? And don’t we ask for things we envy? Or is that greed? I don’t think I understand the difference between these. Maybe Christmas is greed and CES is about envy. But that isn’t a holiday.

Clearly, I need a list of holidays. Ahh, that helps. New Year’s Day is drunkenness, which doesn’t make the list of sins. I suppose I’m glad for that. Sadly, stupidity is not a sin or Groundhog’s Day would get a slot.

Pride? I suppose St. Patrick’s Day. Or 4th of July. Yeah, that’s more general. Though I do like fireworks.  Oh! I know! Ahahahahaaheeehee!

Let’s see:

  1. Lust – Valentines (90% match)
  2. Gluttony – Thanksgiving (90% match)
  3. Avarice/greed – Christmas (85% match)
  4. Sloth/discouragement – April Fool’s Day (75% match)
  5. Wrath – Halloween (50% match)
  6. Envy – CES (40% match); Spring Break (40% match)
  7. Pride – SuperBowl Sunday (75% match)

So the easy ones are easy but the other ones, not so much.

Have you considered this? What did you come up with for wrath and envy? I did consider Christmas Eve for Greed and Christmas Day for Envy. That is better than the ones I chose but seemed unfair that Christmas got two slots.

 

h1

Air Punches!

November 26, 2014

My accelerometer FINALLY arrived (hint: don’t pay for expedited shipping until you know when their ship cutoff time is). It does not work. I am quite cranky about that.

This gets me to thinking about that fourth possible mode (three others flowcharted in previous post, flowchart is a verb, right?). I am pretty certain I can set thresholds to get an interrupt on a sudden motion, such as the very end of a punch (even an air punch). So… the ring is going to say “KER POW”, “BIFF”, and “THWACK” when that happen.

This amuses me very much. I thought it might amuse you. I plan to make it little screens with edges, Batman style, not just words. I suppose I have time to do that artwork and put it in the code. Since my accelerometer is DOA. Hmph!

 

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.

 

h1

Let’s Get Wordy!

November 20, 2014

I got a MicroView: a tiny Arduino with a nice OLED screen. I want to make a ring with it. When I tap the ring, it should give me a word. If I tap it again, the ring shows the definition. I’ll call the ring WORDY and vocabulary geeks all over the land will rejoice.

I’m sure you are wondering how to build this (and not why I would want to). The critical component is the MicroView. Here, have a picture to see how big it is on my hand.

MicroView on my hand

It fits reasonably well on my ring finger, easily on my pinky. Now all I need is:

  • A battery
  • An accelerometer
  • Ring to mount it on
  • Connecting all that together

Let’s start with the battery.  It has to be small. When I measured the MicroView as consuming 330mA (5V), I was bereft. Of course, where was it putting the 1.5W without burning things? Once I read a handy book with a section on how to measure current correctly with an ammeter, I found that the MicroView consumes about 13mA with the screen lit and can be put to sleep to consume 0.13mA. And once I stopped trying to use STUPID math (thank you tymkrs IRC!), that meant I could expect a 50mAh battery to last for about 100 hours, far beyond my minimum goal of 3 hours.

Tangent: When I work on client projects, I’m quite disciplined, writing things down, looking them up, and double checking my math. It seems that on my own projects, I keep trying to shortcut to the most obvious solution. Maybe it is because this is Arduino-based so I think it should be easy. That’s dumb because I’ve used the ATmega328, it is not a simple chip. Adding a layer of niceness doesn’t make for an easy system, it just is one layer of niceness.

The next thing to add is an accelerometer. I like accelerometers: they give a layer of flexibility that is just lovely. I could say I want to “tap to activate” and have that mean: tap, move above some threshold, double tap, change orientation, etc. I could work out the user interface details after my prototype was functional.

Or it would mean that if I didn’t keep blowing up accelerometers. Naw, that’s not right, if I’d blown up the accelerometers in tiny little explosions, that would be better. Instead, I tried to use the Sparkfun MMA8452 breakout board. There is plenty of example code for this accelerometer on an Arduino. Funny thing though:  the standard Arduino board uses 5V but has 3V out. And there were some writings about adding resisters to decrease the voltage that the 3V accelerometer part would see on GPIOs.

Perhaps I should have paid more attention. Though I did read it several times. I should have looked several plus one or two. I would never just try it if I had an EE to talk to, which I would at a client’s. (Sadly, my best EE friend moved to Seattle. He’s happy but I have no one to take to that Japanese place next to Baskin Robbins and bribe into telling me I’m about to do something moronic.)

Anyway, that accelerometer is dead. I forgot to do the voltage limiting resistor trick on my interrupt line. Whoops. (Since I need a low signal to get out of sleep, I used the internal Arduino pull ups. Anyway, that accelerometer is dead.)

However, Adafruit makes me think I’m not the only one with this particular issue as they sell the same accelerometer in a 5V tolerant breakout board. Two things you should know: it isn’t the same part (MMA8451 instead of 8452, mostly the same but not, you know, the same); and the address line is not 5V tolerant. I couldn’t get it to respond to the “who am I” register query so I kept moving the address line until that time I missed the 3V (output from the Adafruit board) and the GND, putting it on the 5V that is between them on the pins.

breadboard with dead accels

Here you can see a picture of my little breadboard with my two dead accelerometers. A new Adafruit accelerometer will be here tomorrow. My driver is in a better state (it worked right before the accelerometer stopped working) so I’ll be leaving it in the default address state.

However, this Adafruit bread board is just a wee bit too big. I mean, just a tiny bit too big.

photo3

My plan involves a Dremel tool (and safety glasses and a mask). Should be no problem right? Actually, the top of the board has several 3-4mm of unnecessary board. I only need to shave off 1mm and it will fit.

In the meantime, the button works really well. If something happens to the accelerometer tomorrow, I’m going to radioshack to see if there are any tiny press buttons.

Stumbling along in the project, I have ring blanks. I made them out of freaky “cloud” clay I found at the hobby shop (D&J is awesome). I was hoping they’d have small LiPos, only in other things and long-thin ones for aircraft but they did have this cloud clay.

It is pliant when dry and super light. It says it doesn’t shrink but it totally does. It smells like hair conditioner. Nail polish works really well on it so even though I got white, my rings aren’t staying that way. It isn’t rubber like Sugru but it seems reasonably durable. I would like to 3D print a ring base but I’m pretty happy with my cloud clay blanks. Though I might try Sugru too.

Now, connecting it all together. Hmm… the new battery will have a JST connector. I can’t see how to keep that which means cutting that off and stripping the wires. But how to route them? I’d like to put them in something with a connector but then I have to run wires around my finger since the connectors are sorta big.

ring blanks

Yeah, those wires are pretty hideous. I guess I’ll  wrap wires around pins and use a little bit of electrical tape method. I don’t like that either as it becomes a construction project to charge the battery but, hey, 100 hours means a lot more play time than the 3 hours I thought. Though, since the clay did shrink, some of the ring blanks don’t fit all of the pins (as shown). I can make some new ones, I like playing with the clay. (Did I mention it is a little freaky? It is weirdly weightless.)

As for the code, it is pretty simple. I’ll post a link. The flash based wordlist that gave me the most trouble (again because I went for the easy looking path instead of what I know to be true about the ATmega). Also, I want a much better word list. The GRE vocab list I started with is interesting but I know most of these words. Wordnik has a lovely set of lists and words but they aren’t easy to download (maybe there is an API?), On the other hand, the sleep and low power code went in without a hitch.

So, this is what I’ve been working on. It has been amusing and difficult. I’m ashamed of myself for blowing the accelerometers but sort of pleased with myself for using my downtime to learn things, even build things.

 

h1

Still Alive

November 18, 2014

I haven’t been writing here so much. At first, it was because I was frantically busy, trying to impress clients with knowledge by reading ahead in the textbook the night before. Then there was a wedding which I maybe over-planned because that’s what I do when nervous (it was great, we stuck to plan A nearly the whole time; I probably didn’t need to create plan N, let alone Q).

I finished with my clients the week before the wedding. I’d rather do something closer to my skillset. I like learning but I want to build closer to what I already know instead of continuing to cantilever ever more esoteric information.

I’ve been contract-free for a couple weeks now. That used to freak me out. I was ok for one week but not much more than that: OMG, will I ever find work again?!?

As I did the accounting, I found that the business can pay us for the rest of the year with the money we have in the bank (not even counting outstanding invoices). Sweet! I have three potential clients starting in the New Year, probably one will work out.

And, yet, I still didn’t write. There was hackaday judging but that finished a while ago, writing up my thoughts didn’t talk all that long since I had plenty of notes. There was some planning involved with my birthday party (cake, check; guests, check; champagne, check; flowers, check; planning done!).

I did go to a class from ST Microelectronics, acquiring an M0+ discovery board,  M0+ nucleo board with a BTLE daughter card. That was interesting. I wanted more “how to do low energy” and they had “look at our super shiney parts you can use to do low energy”. There were some hints but nothing new to me (sleep early, sleep often, sleep deeply). I also got a potential podcast guest to talk about Cortex processors but he was baffled by the idea people would listen to a whole hour of reasonably technical information. (Yes, this does concern me, we’ll see.)

And now I’m at a class about 3D printing, getting terrible and expensive ideas about things to buy for our business. This afternoon, I plan to attend a class about wearables and electronic textiles (stretchy conductors!). I’m here on a press pass (boggle), mostly signed up to attend because I have free time and I’m procrastinating about other things.

Both SOLID and the embedded systems conference have opened their call for speaking proposals. These are both “in my wheelhouse” (I hate that phrase but I find myself using it far too much, I suppose it allows me to say “in my area of subject matter expertise” without sounding like a total nerd). I don’t have a plan for them. I’m tempted to take a chapter from my book and talk about it. I’m tempted to compile a bunch of low power tips and making a presentation. I thought about updating my network comparison presentation (see Element14 text version). But these all seem like so much work. Can’t we just have a podcast about it?

I do have a little project I’ve been working on involving my MicroView (tiny Arduino based system with a pretty OLED screen). I’ll write about that separately since I’ll put the code up (even ask for input!).

Anyway, I’ve been distant for a month or two but you’ll probably hear more from me in the next month or two. I should be looking for a contract but I’m goofing off instead. For a little while.