2008 Headshot

The Life Unwired

with Ben Combee

Upcoming Classes at NYC Resistor!
2008 Headshot
[info]unwiredben
Just a reminder to you all that we've got some great classes coming up at NYC Resistor.

First, this Saturday, Raphael is teaching about the wonders of the Joule Thief!  It's a class about how to pull every bit of current possible out of little batteries. If you want to run something for a long time, check this out.  Details at http://joulethief.eventbrite.com/.

On Sunday, Liz and Ryan are leading an Arduino workshop where you get to solder up a Freeduino kit and then make it do amazing things.  If you want to get your hands dirty, this is the class to take.  There are just a few slots left for this one. http://arduino101.eventbrite.com/

On Sunday, November the 8th, Chris is teaching "CPUs 0b1100101: Intro to computer processors".  We've been talking about it here on the list -- it's all about computer architecture and how those chips that power your computers and devices work. http://cpus.eventbrite.com/

I'm very excited about the Build Your Own Retrocomputer class on November 12th.  Vince Briel is coming in from afar to lead a session where you can build one of his kits, including the Replica 1, a clone of the original Apple I.  It's way cooler than having an iPhone. There also will be a bit of an intro on the Parallax Propeller chip that's used in both the PockeTerm and Replica 1 included.  Details at http://retrocomputer.eventbrite.com/.

Finally, I'm teaching my popular Webduino class again on November 22nd, just before Thanksgiving.  Won't time with your family go even faster when you've got an Arduino acting as a webserver in your home? Come to the class and find out how you can make it happen.  It's online at http://webduino.eventbrite.com/.

These classes are fun, and they help keep NYC Resistor alive and in our great space in downtown Brooklyn.  Come down and learn.

Webduino 1.3 update
2008 Headshot
[info]unwiredben
(Update: version 1.3.1 is now up due to a nasty bug found over the weekend.  I didn't test as well as I should have.)

I've updated my Webduino web server library to version 1.3.  This was prompted by a discussion over on arduino.cc where a user was having problems communicating with the server from his cell phone.  I looked at the "read a new character from the network" logic and realized that a slow connection could let the Arduino think the client had finished its request when it really was just waiting on a new packet from the sender.

When I fixed that, I ran into a new issue.  Modern HTTP clients will usually make a request in "keep-alive" mode.  This means they don't close the socket when the finish asking the server for data, but instead keep it alive in case they want to send more requests.  So, to determine where I was done reading POST data, I needed to look at the Content-Length header passed with the POST and kill the connection after reading that many bytes.  Before, this wasn't a problem, as I'd just assume the connection was dropped when I didn't have any new data coming in from the client.

These fixes are in v1.3, along with some code you can turn on to debug your server's responses (it does slow things down a bit because the serial output code doesn't run in the background) and a fix for a possible security hole in parsing POST requests.

If you're into it, get the new code from http://webduino.googlecode.com.

Turning a Mistake Into a Nightlight
2008 Headshot
[info]unwiredben

A few weeks ago, I sent off the 1.3 version of my RGB LED Shield to get fabbed. It was waiting for me when I returned from the Mozilla All-Hands meeting in California, but when I'd put it all together, it didn't work. I started checking soldering joints and electrical connections and discovered the problem; two rows of pins were swapped in my board layout, so it wasn't connecting the right pins to the Arduino. Because of the way that the TLC5490 pins are connected to special timer outputs, I couldn't fix this in software. I tried to see if I could reroute the signals on the board, but it didn't seem possible, However, I was able to verify that if I connected the board up with wires to the right pins, it did work.

Fast forward a couple of weeks. I'd gotten in a little board called the Stickduino. It's a small Arduino-compatible board that is about the size of a Flash drive. One end is a USB port, although it's not quite thick enough to make good contact in my laptop. I fix that with a couple of pieces of cardboard and a glue stick. I uploaded my arrows sketch to the board, then wired it up to the 1.3 RGB shield. The solid core wire was stiff enough to hold things in place, and it worked when I plugged it into my laptop.

To power this, I got out a $5 USB power supply I'd picked up on my California trip. It's not the most reliable gadget, but it's small, and if you aim the USB port to the ceiling, it will hold up the whole contraption. The picture is from it running in my bathroom. I've also got a YouTube video of it running it's very bright pattern below.

I'd probably not use this as a real nightlight, but as a quick light show at a party, I'm all over it. I also now have something to do with the rest of my v1.3 boards.


Another RGB LED Shield Video
2008 Headshot
[info]unwiredben
Here's one with a color box pattern that I wrote:


Video of the RGB LED Shields
2008 Headshot
[info]unwiredben


This was taken Sunday night over at Eric's place. The patterns you see going up/down from the LEDs are artifacts from the CCD sensor; you don't see them with your eyes. I think I'll do another video of the patterns bouncing off a wall to give a more ambient experience.

First Three RGB LED Shields in Action
2008 Headshot
[info]unwiredben

I got my first PC board back from Seeed Studios on Saturday; they arrived mid-week, but since they shipped from China, I had to go to the Post Office to retrieve them and sign the customs form. The box had a variety of parts including a big bag of tiny switches, and it had the five PC boards. I put my own board together that afternoon and tested it, but the real fun was earlier tonight when we got three more of the boards populated and flashing lights. Eric Moore got his waves test pattern running in a spiral configuration, and it looks really nice, especially bounced off a dark ceiling or wall.

There's more pictures at Flickr, and I should soon have the website at http://combee.net/rgbshield populated with part lists and assembly instructions. I've got a few tweaks to make for a version 1.2 of the shield based on our experiences putting these together, but nothing that should be too difficult to setup.

Introducing webduino
2008 Headshot
[info]unwiredben
I've been working on a pretty nice chunk of code for the class I'm teaching later today. The main idea of the class is to put a web server on an Arduino board. Once you've got that, you can use any computer with a browser to pull data from the board or send commands to control things. As I worked on the code, I realized that a little refactoring would turn it into a nice framework for building lots of different webby things.

If you're interested, the project is hosted at http://webduino.googlecode.com. I'm releasing it with a MIT-style license. I expect to do a few more modifications to it over the next few days, especially after feedback I get from the class. I'll also probably restructure it to fit into the library scheme used for Arduino add-ons; right now, you just put a copy of the header into the folder with your code, which is nice for keeping it with your sketch, but not-so-nice for code duplication.

Teaching an Embedded Web Server Class
2008 Headshot
[info]unwiredben

BTW, if you're up here in New York and want to learn about making embedded devices that act like web servers, I'm teaching a two hour class on the subject on March 28th at NYC Resistor. After the class, I'll be putting my materials online, but I'm still working on everything right now.

You can get details on the class at http://www.eventbrite.com/event/302042417.

More with Mozilla and htinkering
2008 Headshot
[info]unwiredben
Work continues with Mozilla.  We're about to go into a week of testing on the first beta release of Fennec for the Nokia N810.  I've got one major patch that should be in this release.  I've been working in the JavaScript code that acts as the front-end of the browser.  We had a problem that we could drag around the content of the page, but lists that were in the chrome around the page, like the URL suggestion list or the bookmark list, couldn't be moved.  My patch moved the drag handling to a higher level so it can be used to handle both cases.  Most of the implementation strategy came from Stuart and Mark, but I did the actual grunt work of writing the code and getting it to run correctly.

I really like the Mozilla review process.  Basically, I do work on my own machine and post it as a proposed patch to the bug.  Other people on the team get a change to review the change, and if they like it, they give it a thumbs up.  If they have issues, they post them back to the bug, I fix them, and produce a new patch.  Once the reviews are all accepted, the change gets landed in the source repository, and it goes into the next official build.

Outside of Mozilla, I've started doing some work with a new hacker group here in New York called HTINK.  The h is silent, so it's pronounced like "tink", and makes me a htinker.  We've got a big workshop we're doing here in NYC on March 14th where we'll be building lots of Arduino-compatible microcontroller boards and hooking them up to RGB LEDs and robot servo motors.  There's more stuff being discussed later in the year too.  I'm also working on material for an Arduino web server workshop where I'll show how to hook up one of the boards to your Ethernet and run a simple server on it so you can read sensors or change outputs.  That class will happen at NYC Resistor, probably in early April.