Arduino and Gmail

Teaching Arduino at the Hack Factory

Getting Arduino to communicate with Gmail, from the class that I taught at Twin Cities Maker

The basics were getting Arduino to talk to Gmail and then turn on a LED.

Step one: Load you Arduino with PhysicalPixel. It’s under examples, Communication.
Step two: Install Python and Pyserial
Step three download the ArduinoandGmail.py code

Step Four: Edit the Python Code. You will need to edit two things:

s = serial.Serial('/dev/tty.usbserial-A6008dvx', 9600)
Between the first tick marks enter your serial connection, you can find this by going to the Arduino IDE and then Tools, Serial Port, what is checked is what goes between the tick marks.

#inser username then password
rc, resp = M.login('USERNAME', 'PASSWORD')
print rc, resp

Enter you username and password.

Step Five: Run the python script and you should be good to go, the python will send letter ‘H’ when you have 1 or more unseen emails and ‘L’ when you have 0.

Step Six: hook up a LED and Resistor to Pin 13, or hook something else up that you want to turn on.

Step Seven: Get the LED to turn off, Join up with others talking about Inbox Zero or you can change the threshold to what ever level you want and ignore Inbox Zero.

the Python Code:

# Code my Mike Hord, Kelly, and Paul Sobczak
# Gmail and Arduino 3/19/11
# Twin Cites Maker

import serial
import time
import imaplib
import re
import string

# interval change for less often
INTERVAL = 1 # check every INTERVAL minutes

last_check = time.time() – INTERVAL*60 # subtract so that we check first time

#change between the ticks your serial link on arduino
s = serial.Serial(‘/dev/tty.usbserial-A6008dvx’, 9600)

time.sleep(1.5)
s.write(‘L’)
IMAP_SERVER=’imap.gmail.com’
IMAP_PORT=993
M = imaplib.IMAP4_SSL(IMAP_SERVER, IMAP_PORT)

#insert username then password
rc, resp = M.login(‘USERNAME’, ‘PASSWORD’)
print rc, resp

# main loop
while True:
if time.time() – last_check < INTERVAL*5:
continue
last_check = time.time()

status_string = M.status(‘INBOX’, ‘(UNSEEN)’)[1]
print status_string[0]
p = re.compile(‘\d+’)
unread_count = string.atoi(p.findall(status_string[0])[0],10)
print unread_count
if unread_count > 0:
s.write(‘H’)
else:
s.write(‘L’)

This code was written Mostly by Mike Hord who operates the Uptownmaker Blog, Kelly and myself.

Update: This is now hosted on a Google Project Page

Origami Phizz Dodecahedron


Built using Washi sheets.
http://en.wikipedia.org/wiki/Washi

Purchased in Kyoto, Japan.
en.wikipedia.org/wiki/Kyoto

Tom Hull’s fantastic Phizz unit
http://kahuna.merrimack.edu/~thull/phzig/phzig.html

Music by Amiina
http://en.wikipedia.org/wiki/Amiina

Filmed on a Cannon s95
http://en.wikipedia.org/wiki/Canon_PowerShot_S95

In a hotel room
http://en.wikipedia.org/wiki/Hotel

In St. Cloud, Minnesota
http://en.wikipedia.org/wiki/St._Cloud,_Minnesota

In February
http://en.wikipedia.org/wiki/February

Which is now in the Past
http://en.wikipedia.org/wiki/Past

or is it?
http://en.wikipedia.org/wiki/The_Unreality_of_Time

Origami Lazy Butterfly

My recent foray back into origami has produced this simple butterfly. As far as I can tell no body else has come up with the design but I could be wrong. The butterfly is a tribute to Mr. Devendra Banhart, with respect to his song, “Lazy Butterfly


2 US Dollars | 1000 Korean Won |1 Honduran Lempira

Original design by Paul Sobczak

Scandinavian Toilets: The Book

Scandinavian Toilets is a collection of over 100 toilets as seen and used by myself while living and traveling in Scandinavia (Norway, Sweden, and Denmark). There are 12 editions in total, and each is hand bound using the coptic binding technique.

The front cover is made of a relief print based on two separate toilets, which splits the collection in half. Six with a urinal and Six with a standard toilet. Each book is comprised of about 4-5 hours of work.

A gallery of all of the toilets is available for viewing pleasure here.

More information about the relief printing process can be found here.

Bliptronme: Bliptronic + Arduino = Monome




My latest instrument or rather control surface is the Blipronome. It’s a combo of two technologies put together by Wil Lindsay at /* straytechnologies  */ namely, the arduino and the bliptronic. The whole idea of the monome is haptic feedback and it’s engine is buttons and leds. Making an array of switches is easy enough for sure, I am typing on one now but there is no feedback loop to the actual keys just to the screen, Monome is different you click a button and it toggles from off (clear) to on (red) (or anything really it’s all programmable).

Inside the Bliptronome is a grid of switches and leds, Mr. Lindsay has taken the liberty to take this I/O and send it to an arduino. The arduino is running custom software based on what the people have been doing over at Arduinome. This software registers each button press sends it to a Ftdi chip and also gets messages from the computer and inturn tuns on leds. The Ftdi converts serial data to usb.

Once at the computer the there is a conversion package called the ArduinoSerial that is responsible for turning the serial data on the usb into either Midi or OSC  (think midi 2.0). From there you can do anything you want, you can use the switches to control your blender or a garage door if you want, but most of the programs are dedicated to music, and most of those have been written in MaxMsp and of that most of the awesome ones have been written by Tehn and Stretta. Some of my favorites so far are 64Step, Mlr, a full list of applications can be found here on the monome site.

Why Bliptronome: According to Stretta’s post on the history of the Monome :

Sales of the first 256 and 128 were quite swift compared to the original 40h. The first run of 64s sold out in two minutes.

256
September 2007 (100 units)
August 2008 (100 units)
July 2009 (100 units)

128
December 2007 (100 units)
May 2008 (100 units)
January 2009 (100 units)

64
January 2008 (200 units)
October 2008 (200 units)
January 2009 (200 units) Only 200 units made!!!

There aren’t that many monomes out there and they are expensive a 64 is going for $600 dollar on ebay right now. Further the diy arduinome is around $150 + with no case, and the nomome (Novastation Launchpad) for all intents and purposes is the best option is $200.

The Bliptronome comes in as being the cheapest option at about $130, and it also comes with 4 potentiometers that can be useful to some.

Bliptronome improvements:

  • The potentiometers I got in the kit didn’t have holes to guide the wire through which made soldering a real pain, this is an easy change the pots to ones with those little holes.
  • The Ftdi is just loosely hanging out. I think putting it inside an altoid tin or similar would ease some minds and make the whole thing more durable.
  • The play button is not used
  • The original  functionality of Bliptronic is lost (this is not that big of a deal)

In the Flesh:

Iowa A Day: The Post Card Book

09272009570Iowa a Day has now been realized into a post card book. Only a short run is being made so if you haven’t expressed that you want one and you do, I suggest you do so quickly.

The post card book includes all of the photos from Iowa a Day plus one extra. Each of the discriptions for the photos are inculded on the flipside of the cards, which are indivudally detachable. The book also features a japanese stab binding. This post card book is ment to be used.

Three Moon Shoes in Scandinavia (Mix Tape Release)

three1My mix, Three Moon Shoes in Scandinavia, has been completed and is available if you are so interested. The mix includes songs that I have listened to and shared with people along the last 15 or so months, and it is quite good if you ask me.

The first version of this mix tape circa June 2008 is also available upon request, but for that one you need to mail your request, if you need my address just ask.

“Four Moon Shoes in Scandinavia” is scheduled to come out in December 2010.

Bookbinding (the start)

I have been meaning to start a book binding project for quite some time, and I finally made some headway and completed my first book. I picked up “How to MAKE BOOKS” at a book store, it’s not the best book a tad bit too arts and crafts, and the author does not comply with the internationally standard rules for documenting mountain folds (something that this website takes pretty seriously.)  But near the end there is a section on Coptic binding which is what I tried first. I need to use coptic binding because for one of my projects I allready have made 3 sets of signatures and the way I prited them only coptic will display each page.  This first test was a success and it was really easy to do, now what to fill that book with….

Scandinavian Toilets


scant2

Scandinavian Toilets a collection by Paul Sobczak

This is a collections of toilets that I collected while living in Oslo, Norway in 2007. I traveled around Scandinavia (Norway, Sweden, Denmark) and took pictures of the toilets that I used. There are 116 images in this collection spanning the following cities: Oslo, Fjærland, Tromsø, Kristiansand, Stockholm, Gothenburg, and Copenhagen. Each image is attributed with the location at which it was gathered as well as the date it was taken.

There is a book version of this collection that will have a relief print on the cover that is in the works, the book will be limited to 10 copies.

Seven Sedimenting Backgrounds

16092007316

I just released Seven Sedimenting Backgrounds over on Canada Goose Records, the record is a collection of soundscapes or drones that I have created this year, at Canada Goose you can listen and or download the whole thing. The cover of the record uses the picture above which I shot in just outside of Fjærland, Norway, the greenness of the water is what it actually looked like, further it looks that way becasue of the glacier and the sediments the the glaciers create.

I also posted up the full downloadable audio for the Street: Volume the First If you haven’t heard or seen that I suggest heading over and taking a look, I am quite happy with the project, and I am really happy to have had the chance to record Mary Grace and Raphael and Friends – Different Shades. It’s a great song and really catches the spirit of this project and, well life in general.

I Can Eat Glass

 

I can eat glass

I Can Eat Glass Project:

The I Can Eat Glass Project lets you discover how to say the phrase “I can eat glass, it doesn’t hurt me” in different languages.

The project was inspired by Ethan Mollick’s I Can Eat Glass Project. Mollick discribes his project with the following:
The Project is based on the idea that people in a foreign country have an irresistible urge to try to say something in the indigenous tongue. In most cases, however, the best a person can do is “Where is the bathroom?” a phrase that marks them as a tourist. But, if one says “I can eat glass, it doesn’t hurt me,” you will be viewed as an insane native, and treated with dignity and respect.

The site uses Gooogle Maps API, and some slick PHP that I learned to make it work. I hope you enjoy it.

Field Recording : San Francisco | 3/11/2009

 FR COVER

Early 2009, I traveled to San Francisco on a trip that took me coast to coast across North America. Here is a short introduction to that trip, and to the city of San Francisco.

This recording starts out with two binaural recordings of the Fisherman’s Wharf on the edge of city, where I sat on a pier with a view of the golden gate bridge while people and a class of children passed by.  Next is a piece that features one of the trolley cars the city is so famous for.  This transforms into a train on its way to San Jose where you can hear a call for the Sunnyvale stop.

Now, back in San Francisco, we go underground and hear a bit of “I’m going to Let it Shine” from some street artists in one of the many the BART subway stations. A bus comes around I board and am joined with a San Fran native talking, there is no need for encouragement, he was just talking on his own to no one in particular, but every once in a while he directed a statement towards myself or the bus driver. Next, a bit of saxophone from a street artist playing on Mission St. at around 8 in the evening.

Then I travel to San Francisco’s Noise Bridge a member based electronic/hobbyist club where a member is talking about the “smart drugs” that he is taking, neuro inhibitors, and alcohol. Then I jump into a car and turn on KPFA one of my favorite radio stations out of Berkley, CA. This en route to Menlo Park on highway 101. The host, Robby Osman talks about Obama, Pete Seger, Big Bill Broonzy, amongst others, and plays some music. Back in San Francisco again, a short story from one of San Francisco’s homeless sharing some information about an event that impacted his life. The last recording takes us back to where we started at the Fisherman’s Wharf, where a street artist with a rather large curly mustache is plays some blues on his guitar that slowly fades away.

Paul Sobczak – Field Recording San Francisco 3/11/2009

This was recorded was made using the built in microphones of a Edirol R09HR solid state recorder and a pair of binaural microphones.

*Note this recording will be released on a yet to be formed net-label in the future.

Twin Cities Maker Launched

Twin Cities Maker

On January 6th I launched Twin Cities Maker, a website dedicated to realizing a high-tech maker shop in the Minneapolis/St. Paul area.

The goal of the website is to find people interested in creating a maker shop, and give them an avenue to start talking about it.

A maker shop as I have coined it is membership based physical location where people combine their talents and capitol to create a workshop with tools and classes, that are out of the price range of the individual.

Think of a maker shop as a membership based gym like the YMCA but instead of racket ball courts and yoga lessons, there are CNC routers, and micro-controller classes.

Maker shops have been growing in the last few years here in the United States and abroad. Some specific movements to note are the NSF funded Fab Lab, the community based hacker spaces initiative, and California based Tech shop.

Each one of these maker shops are approaching the same idea from different angles. Some maker shops are have about 10 members and meet primarily on the internet while other maker shops have 15,000 square foot facilities with over 400 annual members.

The thing that they have in common is their community approach and their goal of making high-tech affordable.

At Twin Cities Maker we would like find out the interest level in such a maker shop and to see what type of high-tech equipment is wanted, be it laser cutters, 3D printers, or T-shirt screen printing presses. We also are starting the conversation on where the maker shop should be located and how to fund the endeavor.

I invite anybody interested from the Twin Cities or elsewhere to join the conversation and help the project get off its feet.

Acceleration Compensated Tilt Sensor

Tilt pdf

I have been working on an acceleration compensated tilt sensor for awhile now and plan to make the whole thing open source and share all of it in the future, but I have a few things to finish before then. So while you are waiting take a look at this video I put together explaining a bit about it and the sound hack that has been built in. There also is a pdf explaining some aspects of the design above.

[kml_flashembed movie="http://www.youtube.com/v/oLkXMs1vI5g" width="425" height="350" wmode="transparent" /]