Three Hearts, one Arduino

by Jimmie on January 12, 2010

Today I started playing around with the new Open Heart v2.0 based off a project that came up at 26C3. My friend Alex wanted to run three Open hearts as a life meter on one of his tactical corsets. I loved the idea, and said that it should be possible to do that with just one Arduino, but today I decided to sit down and work that out. You can check out the code here, and you can order an Open Heart v2.0 here.

Basically I just modified the old display function to only do one frame for each heart at a time. It still uses the same animation bitmaps, but now it sets a toggle for each LED, and then passes them on so that each heart is lit up at the same time. This allows you to have three separate animations refresh at a similar speed, without any being brighter than the others. The next step will be to add in some kind of input that allows you to change the animation. Perhaps a button or IR detector that makes a heart go out, or alternately refill.

I also learned a bit more about the LED ghosting issues that pop up with Charlieplexed displays on the Arduino. By ghosting, I mean that some LEDs partially light up in certain configurations. What it comes down to is the specific Arduino board, and anything that may be connected to some pins on that board. Pin13 has been a known problem, but now I know that it is due to the LED that is generally connected to it, causing a grounding path. Basically if your Open Heart has a bit of ghosting, change the pins around a bit till it goes away. I’ve also found that different makes of Arduinos have different properties. Basically the fewer extra things hooked up to the pins, the better off you are. This is going to be an interesting problem in the future for the LoL Shield development, as the ghosting now appears to be entirely a hardware problem outside of my control.

For a Duemilanove or similar, just go with pins 2-7, as those seem to do the best, and you can turn the port off in one sweep. The analog pins seem to work second best, and you can address them as digital pins 14-19. Pins 8-13 are dependent on the make of Arduino. My Bare Bones Board seems to do well regardless, but there is nothing connected to any of the pins (it’s one of the older ones, and the only 168 I still have for testing). Leave a comment if you have any further suggestions, or have any other observations.

{ 2 comments… read them below or add one }

1 Matt Mets January 12, 2010 at 00:49

Hmm, three hearts? Do I sense an open octopus kit in the future?

2 Jimmie Rodgers March 3, 2010 at 23:05

Three hearts was cool. I do not know if you know it but Asley Kenner Had A little Girl On the 27th of February 2010, her name is MaKayla Ruth Kenner. Cute little shit. Anyway I love Ya, and HOPE TO HERE FROM YOU SOME TIME!

Leave a Comment

Previous post:

Next post: