## Thursday, February 28, 2008

### Weight Loss Milestones: Past, Present and Future

Past

My time-weighted, moving-average BMI dropped below 30 on the 7th. Also, I had to buy a couple new pairs of pants several months ago.

Present

The new pants are starting to feel a little loose too. And just this morning, I put my belt down another notch. To the last notch. It's a little bit too tight this way, but up a notch is way too loose. "Pants feel a little tight" is a good way to keep from snacking at work.

Future

Looking at my log, I see that it will be a year on March 26. I've dropped 33 lb in that time. Since I need a short-term goal to really get me moving, I thought maybe I'd try to reach 40 lb (2/3 of my original long term goal) by the 25th, but I don't think that's really feasible.

Up until now, I've been short an average of ~350 calories/day. To lose 7 lb in 30 days I'd have to short myself ~800 calories/day. That doesn't sound too healthy. So I don't know what short term goal I can set myself.

## Wednesday, February 13, 2008

### Charlieplexing

A few weeks ago I was really proud of myself for figuring out how to make a binary clock with multiplexed outputs to save pins. Now I learn about charlieplexing and I'm agog. Simply agog.

One project I've been kind of wanting to make is an LED cube. To illustrate just how awesome charlieplexing is, look at how many output pins you'd need to drive an LED cube of a given size compared to the simple multiplexing I "invented".

 Edge Length # LEDs Req. Multiplexed Outputs Req. Charlieplexed Outputs 3 27 12 6 4 64 20 9 5 125 30 12 6 216 42 16

So on the Arduino, where I think I have 12 ports to work with, I could either do a 3x3x3 cube the old and busted way or do a 5x5x5 cube the new hotness way. (Or maybe I have 18-19 ports, in which case it's still 3x3x3 the old way but now 6x6x6 the new way.) But how can you possibly control that many LEDs with so few ports? Read the instructable!

Or read this simplified summary: Basically, you set things up so that every port can be either positive or negative. Then attach your LEDs so that every possible combination of ports lights one up. (Remember that LEDs are one-way valves, so port A being positive with B negative can light one LED while reversing polarity can light another one. Just remember not to cross the streams.) "Every possible combination" of N ports is N *(N - 1), so with, say, 9 ports you can control 9 * 8 = 72 LEDs.

5x5x5 isn't enough to be a 3D display, though. But a larger cube could be decomposed into smaller cubes each controlled by a separate microcontroller. 10x10x10 is probably large enough to show some cool animation, although coordinating 8 microcontrollers might be a pain. Not to mention wiring up 1000 LEDs.