LED Throwies

A group of us were interested in the Graffiti Research Lab's Throwies and decided to try some for Fiesta in San Antonio. A throwie is an LED, small battery, and a strong rare earth magnet. The cost on all of these items is now low enough that you can make the throwies for under 50 cents each in quantity.
IMG_3303.JPGWe started out the evening at La Tuna to assemble the throwies and discuss our plans. After building almost 200 throwies we started talking about where to toss them. At least a few of them went on the outside of La Tuna while we made up our minds. We all piled in the van and made our way to the Riverwalk.

133287772_8a8aecba7e.jpgAt first we just experimented with lamp posts, street signs (most are aluminum) but we soon came to one of the tressel bridges over the Riverwalk. We used up about a third of them on the top of the bridge, handing some to passer-bys that looked interested. Many strangers joined in the fun by throwing ones we gave them and picking up fallen throwies. Everyone thought it was great fun and a cool idea.

Next we trapsed around the river where we tagged a number of fence posts, signs and various vendor and restaurant carts. The undersides of most bridges turned out to be too crowded to risk throwing things but we did manage to light up the beams under at least one bridge.

Before the night was out we returned to the original bridge to see how many LEDs had gone missing. Most of them were still there (the ones up high) so we handed out a few more and added more color to the bridge before heading back to La Tuna. We lit up the back wall at La Tuna with the remaining LEDs before calling it a night.

The whole evening was a lot more fun than I expected with much of the thrill of graffiti without the permanent damage that paint causes. The LEDs should shine for close to a week at which point we'll go back and recover as many as we can to to be recycled and reused.

For some more information about Throwies check out these links:
http://www.instructables.com/
http://graffitiresearchlab.com/
http://www.makezine.com/

[Update:]

Another post about the evening here: http://sweaterproject.org/2006/04/24/concerning-throwies/

XCSSA Stompbox Presentation

IMG_3222_crop.JPGI gave my first stompbox presenation at the XCSSA meeting in San Antonio tonight. It was a good mix of old and young geeks, mostly hardware afficianados with a love of the non-standard.

I hope everyone enjoyed my first attempt at presenting to a user group. it was good to meet new people and I'll definitely try to attend future meetings. XCSSA meets at 7pm on the 3rd Monday of every month in the Nail Technical Center, San Antonio College.

Rich Jennings presented the the Cubix embedded computer stack. It's 1.5" square, runs an ARM[?] processor with 256K of RAM and 2MB of flash. Power consumption is under 100mA for most applications. It runs the open source eCos OS and can be programmed with a number of free and commercial applications.
nokia770.jpgNate brought his Nokia 770. The 770 is now officially on my want it now but will have to wait list. It runs a variant of debian complied for the ARM processor and has a lot of potential. The LCD is amazing for a pocket display with fonts that work great in an xterm. Bluetooth and WIFI round out the connectivity getting you to the net and allowing use of a bluetooth keyboard.

Stompbox – Howto #6 – Summary

Price

It's quite expensive for a toy. I had a hard time justifying the cost to myself but the old laptop I was using had some issues and I didn't expect it to last long. My wife wasn't too happy with the expense but she got over it this weekend when she was able to surf the web and IM with people while we drove 4 hours to Galveston.

If cost is a real concern, just get the evdo card and plug it into your laptop. The next option is one of the commercial 3G routers that can be up and running for under $300. It's probably possible to do the stompbox for under $500 but it'd be tough and you'd have to scrounge a lot of parts.

Value

The stompbox is a solid and robust solution. I don't have experience with any of the cheaper commercial routers but would expect them to be as reliable and nearly as solid. One thing the stompbox offers is endless configuration and software options. It's 133Mhz 486 processor and 64MB of RAM make it powerful enough to run a large selection of applications. If you've got some Linux experience, time, and a few C-notes to burn then I'd suggest giving it a try. The project has and continues to be fun.

Continue reading

Stompbox – Howto #4 – Config and Customize

Configuration

By now you should have a login prompt in your serial console. Login as root, no password and run the stompbox config script, /usr/local/bin/initial-setup. The questions are pretty self explanatory. If you don't know the answer to a question, take the default. I don't have a camera or gpsd setup but it still asked me to configure those items. I just hit enter on the defaults to keep going. I do recommend getting a dynDNS account and entering that info. It makes it a lot easier to get to your stompbox from the real world. If you don't want to mess with dynDNS then just enter something and we can disable it later. When the script is done you should reboot the box.

The setup script fails to update /etc/resolv.conf so you'll need to do that before you can get along with much else. Put the box in RW mode (remountrw) and vi /etc/resolv.conf. Change the IP of the nameserver to the local wifi address (127.0.0.1 should work too). If everything went well you now have a working stompbox.

Continue reading

Stompbox – Howto #3 – First Boot

Boot Media

You'll need a 128MB CF card and a card reader for your computer. I would think a larger card would work but many people say otherwise on the forums. I happened to have a 128MB card left from my last camera and a Sandisk USB reader so I didn't have to buy either. I plan to make a 256MB verson just because the extra room might be handy in the future but I'm sure I won't get around to it until I really need it.

Continue reading

BASH: Split a string without ‘cut’ or ‘awk’

For a little test script I'm writing I needed to split a line on a ';' but preservere the "s and 's, something that echo doesn't like to do. Digging deeper into the bash docs I see that there are some handy string handling functions.

#!/bin/bash
line='this "is" a command;this "is" a pattern'
COMMAND=${line%;*}
PATTERN=${line#*;}
echo $COMMAND
echo $PATTERN

And the output would be:

this "is" a command
this "is" a pattern

BASH: Convert Unix Timestamp to a Date

I've been asked this a number of times and always have to look it up, so here are 3 ways to convert a unix timestamp (seconds since Jan 1, 1970 GMT) to a real looking date.
Perl method 1: use the ctime module:

perl -e "require 'ctime.pl'; print &ctime($EPOCH);"

Perl method 2: use the scalar and localtime functions:

perl -e "print scalar(localtime($EPOCH))"

Awk has a wrapper for the standard C strftime function:

echo $EPOCH|awk '{print strftime("%c",$1)}'

Here's a sample script that uses all methods.

!#/bin/bash
EPOCH=1000000000
DATE=$(perl -e "require 'ctime.pl'; print &ctime($EPOCH);")
echo $DATE
DATE=$(perl -e "print scalar(localtime($EPOCH))")
echo $DATE
DATE=$(echo $EPOCH|awk '{print strftime("%c",$1)}')
echo $DATE

[update: Thanks to S. Maynard for reminding me of the proper use of quotes and how to avoid using the pipe...]
DATE=$(awk "BEGIN { print strftime(\"%c\",$EPOCH) }")

[UPDATE]

A reader found another way listed below. This doesn't seem to be as portable (The mac ignores the --date and -d is an illegal option).
# date --date='1970-01-01 1000000000 sec GMT'
Sat Sep 8 20:46:40 CDT 2001

[UPDATE]
# date -d @1000000042
Sun Sep  9 01:47:22 GMT 2001

But this only works on newer versions of date.  It fails on my FC2 server and my Debian Sarge machine, but works fine on Ubuntu Feisty and Debian Etch.