Friday, March 9, 2007

The code!

Here's the Arduino code for the wall:

http://wawi.mine.nu/walloflight/walloflight.pde

More pics

Here's a link to my flickr set on the wall.

Prattner

To program our WallOfLight we made a little program to speed things up for us. Prattner (from Patterner) as it's called lets us click in patterns in a 5x5 grid and then generate C-code that we simply cut-paste into our Arduino code. Then it's just to upload it, and we have a new splash screen.

Project done, how?

Our WallOfLight is finally done, and we had a great presentation this thuesday. Most of the functions worked as we had planned except for some interaction aspects.

The last weeks have been late night and hard work (mostly electronics and wires for my part). I really enjoyed working with Henrik, Gunnar and Kaspar, we made a great team since everyone had their own areas of expertise, but we all still could contribute to each others tasks in constructive ways.

The WOL required lots of cables (around 80m) and to route them all in a nice way took some time. You can see on this picture, the white and purple cables that control each light. They're nicely routed in busses (did those when we still had a few days to deadline). The cables to the buttons were not as nicely routed as you'll see in the next photo (blue cables). That's because we did them the night before =)

One "major hack" that we had to work out was to correct an error we've made with the speed-potentiometer. Those are supposed to be connected with three wires, +5V, output and Ground so you get a voltage-divider. We'll we forgot to connect the ground cable, and since we already had mounted the potentiometer, we couldn't put the thirds wire on it. So we had a variable resistor only at the two cables. To solution: connect an external resistor between the ground and one of the potentiometer wires. This way we got the voltage divider back, but we couldn't go all the way down to 0V. That was easily fixed with little hacking in the software and we were back in business!

Some word about the button polling circuit. Since we would use at least 25 buttons for our project, we had to build some logics to handle these. So I did some schematics that use multiplexers and a serial shift register to select one of 32 individual lines. These are then connected to each of the buttons of the 25 boxes. The rest of the 32 lines can be used for other buttons if needed. The circuit lets us use the same three lines we had for the light circuit. And since that circuit has an Enable-line, it lets us poll buttons without disturbing the shift registers for the lights. With these, we ended up using 7 outputs and 3 inputs of the Arduino. 1 input for the button feedback and two for the scroll-wheel-pulses which I'll explain in my next post. Anyways, here's a couple of pictures of the button circuit, during testing and at work.


Friday, March 2, 2007