New BDes(Hons) Interaction Design

Reflections on Arduino and Processing

I’m just starting my next project now so this seems like a good chance to reflect on some of the semaclock stuff before moving on…

First, I found a bug in processing! This shouldn’t even compile due to the extra right curly bracket before the ‘else’, but it actually runs (shudder).

void setup() {
  if (1 == 2) {
    println("the impossible just happened");
  }
  } else {
    println("zzz");
  }
}

Interestingly the auto-format feature spots the unmatched bracket. I’ll be a bit more paranoid about my coding with processing in the future… I spent an afternoon sitting on the floor of the gallery trying to track this problem down in my code. That said, I still think processing is a great project which I’ll continue to use, and having given up a dead PC in favour of a macbook recently I really appreciate it being multiplatform.

This was my first time using Arduino for a project and generally I’m impressed with how it compares to working with a stamp or a pic. Once you’ve got more than a page of BASIC code it gets very tedious using GOSUBs and global variables, so being able to use a decent language with functions and parameters is a definite plus. And being open source you have access to schematics, layouts etc. which means you can easily modify your prototype, or re-implement it on a custom PCB using a cheap atmel chip. Also the on-board USB connector means not having to search for USB-serial adapters, or custom programming cables or dongles, which I really appreciate.

Downsides — I find uploading code to the board slightly less convenient than a PIC or stamp, ie. having to press the reset button and wait, then hit cmd-U to upload, compared to just hitting the “program” key in the IDE for a stamp or PIC. Since I was using a home-made “shield” sitting on top of the arduino, this renders the reset switch inaccessible, so I was having to unplug and replug the USB cable to reset the board, causing wear on the connectors and confusing the IDE when the USB serial port vanished from time to time.

shield2.jpg

And on the subject of shields, I’m sure there have been many complaints about the fact that the gap between the headers on the board isn’t on a 0.1-inch pitch… I had to solder the connecting pins on my stripboard shield at a deliberately wonky angle to be able to mate it with the arduino.

(Yes, I know there are solutions for prototyping shields, like this breadboard shield hack, and Tom Igoe’s board which also replicates the reset button… but I thought using stripboard would be a no-brainer until I ran into these two issues.)

shield3.jpg

Apart from these minor gripes, I’m pretty sold on Arduino now, and have just ordered an NG board for Semaclock v2, as well as one of the new boards with bluetooth.

No Comments so far
Leave a comment



Leave a comment
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

(required)

(required)