An e-mail counting t-shirt

Posted by Chris Ball Tue, 30 Mar 2010 13:10:00 GMT

I've been wanting to get into electronics for a while now (it seems like a sensible thing for someone who works for a laptop manufacturer to do) but haven't known where to start. Back in January, the fine people at Sparkfun Electronics helped out with that by running a Free Day where they gave away electronics worth USD $100k: $100 free, to 1000 people. I was lucky to be one of the 1000 people, which put some electronics ideas within my reach that I otherwise would have found it hard to justify spending money on.

And, here's the result — Madeleine and I made a t-shirt together that displays how much unread e-mail I have using an Arduino Lilypad and Bluetooth dongle, and an Android phone to send the number of unread mails to the shirt. Here's an image of the center of the shirt, and a video showing it in action:



Lilypad t-shirt (youtube, download in Ogg Theora)

I've uploaded the source code that runs on the Lilypad and the python script that I'm running on the Android phone to my github account.

Tags , ,  | 22 comments

Comments

  1. Avatar Greg DeKoenigsberg said 33 minutes later:

    LOL. Chris, this is priceless.

  2. Avatar daniels said about 1 hour later:

    haha, that is too funny!

  3. Avatar Sebastian Dziallas said about 1 hour later:

    This is hilarious! Great stuff. :)

  4. Avatar RoHS said about 3 hours later:

    excellent work.

  5. Avatar Iain said about 3 hours later:

    How do you wash it?

  6. Avatar Chris said about 3 hours later:

    It's safe to hand-wash the whole shirt with a mild detergent, after removing the battery.

  7. Avatar GGC said about 4 hours later:

    LOL, That's so funny, yeah!!!

  8. Avatar Toby said about 5 hours later:

    Cute - you might want to try a smaller battery though :)

    I wanted to get into electronics too, but have kinda gone in the messy DIY direction - http://blog.hodgepig.org/

  9. Avatar Manoj said about 8 hours later:

    Hey Chris, What an innovation...Incredible...I will so love to have it. Can it work with iPhone? Can you please contact me? I loved this T-shirt...

  10. Avatar Manoj said about 8 hours later:

    leaving my email for you to contact me....please, please mail me...

  11. Avatar Adam Williamson said about 16 hours later:

    In case you didn't know yet - you made Engadget:

    http://www.engadget.com/2010/03/30/t-shirt-modded-to-let-you-know-when-you-have-new-emails/

    All the incredibly cool and popular people who spend their time posting in Engadget comment threads are mocking you. :)

  12. Avatar Shane said 1 day later:

    Can you buy this? I really want one!

  13. Avatar james said 2 days later:

    leaving my email... Can i buy one? please!

  14. Avatar Andrew S. Parnell said 2 days later:

    Hey Chris, Great lilypad project! And a great use of your freeday swag!

    I question the decision to have the Lilypad & Power so conspicuously located, but conceptually, this thing is so wonderfully geeky, that maybe it's appropriate.

  15. Avatar Mithun Ashok said 2 days later:

    Good Stuff.

  16. Avatar xmRipper said 3 days later:

    Radiation!

  17. Avatar moz said 3 days later:

    ya abi bırak bu antil kuntil işleri.

  18. Avatar Jere said 6 days later:

    Excellent!

    Email me...have questions. Thanks.

  19. Avatar ricseasons said 13 days later:

    This is a great shirt! I'm looking to do some stuff with AndroidScript and Lilypad. Did you have a dev phone already or did you root your phone?

  20. Avatar asteronimo said 2 months later:

    I was wondering how you made this work, because the serial library seems to missing in the Python implementation for Android. Or did you only test it on a pc?

    Cheers,

    Asteronimo

  21. Avatar asteronimo@gmail.com said 2 months later:

    Improved bluetooth code:

    -----------------------------
    #!/usr/bin/python
    
    import sys
    import android
    import time
    import feedparser
    
    droid = android.Android()
    droid.toggleBluetoothState(True)
    droid.dialogCreateAlert('Be a server?')
    droid.dialogSetPositiveButtonText('Yes')
    droid.dialogSetNegativeButtonText('No')
    droid.dialogShow()
    result = droid.dialogGetResponse()
    is_server = result.result['which'] == 'positive'
    
    if is_server:
      droid.bluetoothMakeDiscoverable()
      droid.bluetoothAccept()
    else:
      droid.bluetoothConnect()
    
    # Settings -- change these to match your account details
    USERNAME="foo@bar.com"
    PASSWORD="whatever"
    PROTO="https://"
    SERVER="mail.google.com"
    PATH="/gmail/feed/atom"
    
    print "Checking for new mails...\n"
    
    while True:
      ns = int(feedparser.parse(PROTO + USERNAME + ":" + PASSWORD + "@" + SERVER + PATH)["feed"]["fullcount"])
    
      print "\nNew mails: %s\n" % ns
      try:
            droid.bluetoothWrite("new mails: " + str(ns))
      except:
            print "Could not open Bluetooth port"
    
      time.sleep(5)
    
    droid.exit()
    
  22. Avatar Bryan said 3 months later:

    Seems like there is a problem with the python script.

    File "build/bdist.macosx-10.6-universal/egg/feedparser.py", line 200, in getitem KeyError: 'fullcount'

    There is no fullcount in the stardard feedparser. Are you using another one?

(leave url/email »)

   Comment Markup Help Preview comment