Magic Balloons

August 9th, 2008

At Tinker, we’ve been working on some blue glowing balloon clusters for an upcoming event. They consist of a blue LED and an ATTiny13 microcontroller and they pulse with a slow, compelling sine wave. Selecting the timing of the sine wave was an important consideration, but it was necessary to make a choice about the frequency of the wave oscillation before programming the ATTiny microprocessors and inserting them into the balloons. I wrote this little sketch in Processing to get an idea of what a cluster of glowing balloons would look like and used the same sine wave lookup table we generated for the ATTinys.

The code below produces this.

// A program to simulate balloons with LEDs inside.
// Uses a sine wave lookup table rather than
// a sin wave generated by a function.
// Brock Craft, 9 Aug 2008
// at tinker.it

int num= 60; // number of ‘balloons’
Led[] led;

void setup(){

size(300,300);
noStroke();
smooth();
colorMode(HSB);
led=new Led[num];
for (int i=0;i<num;i++){
led[i]=new Led (int(random(width)),int(random(height)),int(random(255)));
}

}

void draw(){
background(53);
for (int i=0;i<num;i++){
led[i].render();
}
}

void mousePressed(){
for (int i=0;i<num;i++){
led[i].x=int(random(width));
led[i].y=int(random(width));
}
}

class Led{

int i;
int x;
int y;
int col;

// mapping the colour intensity to a sinewave that’s in a lookup table below
int map[]={
0,0,0,0,1,1,1,2,2,3,4,5,6,6,8,9,10,11,12,14,15,17,18,20,22,23,25,27,29,
31,33,35,38,40,42,45,47,49,52,54,57,60,62,65,68,71,73,76,79,82,85,88,91,
94,97,100,103,106,109,113,116,119,122,125,128,131,135,138,141,144,147,
150,153,156,159,162,165,168,171,174,177,180,183,186,189,191,194,197,199,
202,204,207,209,212,214,216,218,221,223,225,227,229,231,232,234,236,238,
239,241,242,243,245,246,247,248,249,250,251,252,252,253,253,254,254,255,
255,255,255,255,255,255,255,254,254,253,253,252,252,251,250,249,248,247,
246,245,243,242,241,239,238,236,234,232,231,229,227,225,223,221,218,216,
214,212,209,207,204,202,199,197,194,191,189,186,183,180,177,174,171,168,
165,162,159,156,153,150,147,144,141,138,135,131,128,125,122,119,116,113,
109,106,103,100,97,94,91,88,85,82,79,76,73,71,68,65,62,60,57,54,52,49,
47,45,42,40,38,35,33,31,29,27,25,23,22,20,18,17,15,14,12,11,10,9,8,6,6,
5,4,3,2,2,1,1,1,0,0,0,0
};

Led (int myx, int myy, int mycol){

x=myx;
y=myy;
col=mycol;
i=int(random(255));
}

void render(){
i++;
if (i>=map.length){
i=0;
}
fill(180,map[i],175);
noStroke();
ellipse(x,y,30,30);
}

}

Blue LED Balloon in the dev center

Reading List for Physical Computing

June 29th, 2008

A quick note on books that we recommend during our Arduino Beginner’s Workshops:

Artificial Reality, Myron Krueger
Code, Charles Peltzold
Design and the Elastic Mind, Paola Antonelli
Designing the User Experience, Bill Buxton
Information Arts, Stephen Wilson
Making Things Talk, Tom Igoe
Physical Computing, Dan O’Sullivan & Tom Igoe
Processing, Casey Reas & Ben Fry
Processing,Ira Greenberg
Vehicles, Valentino Braitenberg
Visualizing Data, Ben Fry

What’s the Measuring Turtle?

June 28th, 2008

People have been asking about the measuring Turtle and I realized I didn’t explain the thing. This is a sort of sensing “LOGO Turtle“, which reads how far the wheels have turned and then uses that data to plot a bar graph. The concept centres around understanding of what a stright line is. Although the notion of “what is straight” seems rather obvious, trying to describe it in geometrical or mathematical terms is a bit tricky. Especially when we move from 2D to 3D worlds. One way of thinking about it is that a straight line is as a path of symmetry.

The “turtle” (okay, it is a turtle with wheels!) demonstrates this in the 2D plane or on a 3D sphere. As long as both wheels are turning at the same rate, the turtle is moving in a straight path, which is symmetrical. By moving the turtle manually across a plane or sphere, the movement of the weels can be observed and compared to to determine straigtness or curvature. This is a way of embodied learning about fundamentals of geometry, which we are using on the Spot-On project. We’re taking the turtle into secondary school classrooms early next week to see what the students think of it. To demonstrate using the turtle on a sphere, we;ve procured a couple of giant (1 metre) sports balls for kids to roll the turtle upon!

Turtle undercarriage

June 28th, 2008

The underside of the “turtle” shows the gearing mechanism for transferring the rotations of the independent axles to the sensor wheel. Rather than using an optical encoder - which is basically just too expensive - the sensor wheels pass through the slots of two IR emitter-detector pairs. These TTL logic devices pull up digital pins on the Arduino and this signal is passed to a Processing sketch. The wheels do generate consistent data on the whole, which is what we were aiming for.

Completing the tooth of Blueness

June 28th, 2008

The tracking turtle is almost complete. I’ve added the bluetooth arduino board (Arduino BT), though with a bit of trouble getting it to communicate with Processing via firmata. Serial port keeps getting “clogged up”. However, the sensor wheels and IR slot sensor are working as planned.

Resistors for the IR emitter+sensor combo are visible in the undercarriage.