Interactive music with arduino and sheevaplug, part 1

Recently someone from the hacklab put up a note saying that he had a SheevaPlug to give to a good home. I jumped on the offer. Thanks again, Brian! I’m going to be blogging a little bit about what I’m doing to show that I do have a good home for it.

Sheevaplug plug computer with iPhone for scale

Image via Wikipedia

The first thing that I’m going to use it for is an interactive music player or generator for a friend’s art piece. It’s going to change what’s played based on how many people are in what parts of the room. I’m going to do this by counting the number of people who enter the room using infrared LED sensors, and then setting up sonar threshholds for people to be counted as they cross. To implement this I’ll use the sheevaplug, two arduinos, a bunch of range finders, and either a long cable connecting the two duinos or a couple of xbees.

I’m going to have four pairs of rangefinders on a post, each pair pointing in a different direction. If I see the distance from one rangefinder in the pair drop (call it A), then the other (call it B), I can guess that a person just walked in the direction A to B. I’ll decrement the count of people from A’s quadrant and increment it in B’s quadrant. The music will change depending on how many people are in the room, and how many are in each quadrant.

Why the sheevaplug? It’s powerful enough to generate sound and pipe it through a USB sound card.

The first step in this ordeal was to get FTDI working on the sheevaplug. It appears I wasn’t the only one with this idea. This is great news for me because the kernel I needed to get FTDI working was already compiled. I had some trouble at first, I’d see the kernel was being uncompressed and then it’d hang. As it turns out I forgot to run a few setenv commands. Oops. I was able to run those from the serial console and get going. Now the plug is running just fine.

My next step is to pick up a couple of motion sensors and see if I can get the people counter working. I expect to run into some problems with interference, so I’ll have to play around with the transmit timings. If it works with the two then we’ll see about getting funding. In any case I’m trying to get the costs down, those range finders are expensive!

Greasemonkey script for Torontonian Goodread users

Toronto Public Library
Image by rb3m via Flickr

This target market is pretty specific, I know, but I wrote a script to make searching for books at available at my local library more easy while browsing Goodreads. I’m starting to use Goodreads to track what I’m reading and also find suggestions from friends.

Connie Crosby linked via Twitter to a blog post on how to automatically search your local libraries while browsing Amazon. I don’t browse Amazon that often but it did get me thinking.

When I want to read a book I generally first check out the TPL’s downloadable section. It’s a little sparse for anything other than computer books. (Yes, I do read things other than computer books.) Anyhow, I’ve already gotten some use out of my script when only dead tree editions were available, and I imagine others will find the script handy too.

What it does is it searches the Toronto Public Library’s catalog for the 13 digit ISBN of any book that you visit on Goodreads. If it’s in the catalog, you can click a link that’ll pop up a list showing what branches it’s available at, and place a hold if you want.

This was made possible by the new beta website which is still a work in progress. Still, very cool features have been rolled out.

Known issue with the script: I couldn’t get the “place hold” button to select the right branch, no matter which “place hold” link you click it will ask you to select your branch.

Watch the 1.5 minute video below if you want a preview of what the script does.

И не забудьте: онлайн бронирование авиабилетов

CrisisCampTO

Yesterday was the first CrisisCamp in Toronto. I heard about it from Jacqui Maher‘s presentation at CUSEC, and I decided to attend not really knowing what to expect. It turned out that there were six projects to tackle, and I tried to help with the machine translation project.

The idea was to provide an easily accessible translator for people on the ground. At the time the project started there was no Google Translate project that worked back and forth between for English and Haitian Creole. I think it was Chris that got a translator working based on moses after it’d been fed a corpus of every piece of Creole that he could get his hands on. The CCTO team’s job was to put together a web front end, and an API.

We were asked to write in python. There was no binding for the frontend, but Google had just made their Creole translator accessible. For testing purposes, we’re using their AJAX frontend. After a couple false starts with mod_python and Django, Brian and Kevin rewrote using the Twisted framework. It’s a little more obscure but it’s going to be easier to plug in other mediums like SMS.

We did in eight hours what a more organized team could’ve done in one. It’s hard to feel like I contributed anything other than two false starts and a bit of test code, but I’m still glad I went. I got to participate in creating what I think will be useful on the ground, even if I didn’t add much traction. At the very least I got to learn what it feels like to have a deliverable and a deadline but no spec.

Liveblogging for #CUSEC 2010

I’m still at CUSEC 2010 in Montreal. My plan was to take notes and quickly publish here, but then at the last minute I decided to liveblog for CUSEC instead. It’s at http://live.cusec.net/. So far my favourite talk was from Matt Knox, talking about ethics and how the human brain has a remote root: we bend to authority and do wrong too easily. The Milgram experiment as well as the more recent pranknet arrests illustrated this.

You can see the notes by visting the site and clicking on the archives. Unfortunately I can’t do permalinks very readily, so I might export and clean it up later.

The last reason I didn’t post my notes here is due to my blog being in need of spring cleaning. I need to switch to a cleaner, less busy theme, so might pick one up from WooThemes. I’ll be taking another look at that later tonight, as well as merging my categories.

Reblog this post [with Zemanta]

Links about the Haiti earthquake disaster

By now everyone has heard of the earthquake that hit Haiti.  There isn’t much of a food reserve, there isn’t a great deal of domestic rescue equipment or personnel, and there isn’t an abundance of shelter. I recently read a report saying that none of the hospitals in Port-au-Prince were operational.

Since most of my readers are American, I’ll start off by linking to the MSNBC list of suggested aid organizations. Many groups in the list have Canadian counterparts too.

I tried to decide between Doctors Without Borders or Red Cross. It seems that they’re neck and neck in terms of their administrative cost, so I went with the Red Cross due to their shelter programs. I donated using their online donation box.

The Canadian government has pledged $5 million so far, as well as sent a DART team and put the HMCS Halifax on standby.

Reblog this post [with Zemanta]

The EC-GC spoof is toast, whodunnit?

(Screenshot snagged from straight.com.)

I remember when Telus shut down thousands of websites to take down their union’s website. Serverloft might have just done the same. The Seattle Post-Intelligencer has an article on the takedown of the Yes Men site. I did find an article from straight.com which claims to have the original complaint. The IP address in the complaint there is the same one that ec-gc.ca is currently hosted on. Ole Tange is the contact for PiWeb listed in the IP address for that whois.

At first I was convinced that Serverloft did in fact pull the plug on PiWeb’s netblock. A slashdot comment gave me pause. After all, the message from Mr. Tange is on a website controlled by the Yes Men, and his contact details are publicly available. As of this writing, the PiWeb status page makes no mention of related downtown. Maybe the Yes Men took down their own site as a PR stunt. Here’s a paste from the disputed website.

Website suspended

Serverloft blocked the IP-range for this server because of the content of the client’s website and would only unblock the IP-range if we suspended the website. The website was used in a spoof by The Yes Men.

Serverloft blocked the IP-range without a warrant and without calling us and thus affecting servers hosting 4500 of our customers’ websites until we ourselves discovered the problem, and convinced Serverloft to unblock. Serverloft did send us an email explaining that they would not unblock the IP-range until the websites were taken offline. The email was sent 5 minutes after they cut of the access to the mail server, so we only received the email after the 4500 websites were back online.

Convincing Serverloft that their systems had blocked access on purpose was hard because Serverloft frontline support claimed that all their systems were working fine and they therefore assumed that the problem was a configuration problem on our server. They refused to help troubleshooting the issue.

Serverloft could simply have called us and asked us to deal with the situation. We would then have asked the Canadians for a warrant. If the Canadians had shown us a warrant we would have taken down the site immediately. As others have pointed out the Canadians could probably just have gone through CIRA and have the domain suspended, which would not have affected any of the other 4500 websites.

As we cannot go through every single page that our customers put on their websites we anticipate a similar situation may arise again. We have therefore asked Serverloft to revise their procedures so we at least would get a phone call before they cut our connection. They have so far refused to do so. They have answered:

your net was blocked because of hosting phishing sites. I’ve attached the information, we have, below our signature. I’m sorry, but we cant call every costumer for abuse. In some cases we’ve to respond very fast and have to block the net or server.

While I appreciate Serverloft respond fast, it is no good if the collateral damage is more than 1000 times as big. Had they called I am sure we would have found an arrangement that would satisfy both of us.

For more information: contact Ole Tange <ole@tange.dk>

The only other website I can find running on the listed IP is good-cop15.org, which is also the default vhost for that IP. It’s a site about the Copenhagen conference and links to the Yes Men hoax. Judging from the reverse lookup on the address it’s probably a virtual machine, quite possibly run by the Yes Men. It turns out that there is actually a Bruce Moore at CCIRC, but he wasn’t on duty when I called. Ec-gc.ca isn’t on any phishing list that I can find so that charge was overblown.

I don’t particularly like the Yes Men. They go from satire to impersonation. I’d have loved to see CIRA close down their ec-gc.ca domain but the domain dispute takes a long while. I can understand the letter from the CCIRC. The Yes Men website will do the most damage now, not in the time after CIRA is through with its dispute process. I find it very plausible that the Canadian Government would send such a request.

I also find it very plausible that Serverloft would issue a knee-jerk takedown. It’s relatively common for service providers to take down material immediately after a complain, especially among low margin resellers. From the WHT opinions, it sounds like that fits Serverloft. If that IP address was limited to a virtual machine run by the Yes Men, and Serverloft was okay with risking their reputation by acting on the complaint rather than following up with PiWeb, they could have at least minimized damage by only nullrouting the VM’s IP address.

There’s enough negative material on WebHostingTalk that I wouldn’t want to use Serverloft regardless of the outcome of this case. I’d like to see some official statement from PiWeb on an official channel before I believe the details though.

Update Jan 2nd 2010: It looks like Ole Tange has updated his personal website with details of the takedown.

Reblog this post [with Zemanta]