
This is a portable interactive installation using a non-traditional user interface. The installation represents a game with a grid of LEDs that can be embedded as a carpet into the physical space. A pattern of lights is generated dynamically, that change in real time according to pedestrians movement over the carpet. In this case the pedestrians become participants that influence the generative process and make the pattern of LEDs change with the change of the location of one or more participants. The aim was to create a novel urban experience that invites social interactions with the interface among different people as friends, observes or strangers.
The LED-s Urban Carpet consists of two layers: the first is a grid of light-emitting diodes (LED-s), which turn on or off depending on a computer program, written in Processing, which defines the behavior of each light at every instant. The program use a Boid algorithm based on Craig Reynolds’ rules, to simulate a flock of seagulls that follow the pedestrian. It gives the whole experience a recreational and fun atmosphere. The location of each pedestrian over the carpet is recognized by a second layer: a grid of pressure pad sensors, which is located behind the grid of LEDs. Both the LED and pressure pad layers are connected each one to one Arduino board; the first sends the user’s input to the computational program and, the second performs the outputs controlling seven LED Display Drivers M5054 (32 pins)
/* CODE FOR ARDUINO
*
* "LEDs URBAN CARPET"
* LED DRIVER M5450
* reading 4 bytes from processing
* by Alasdair Turner & Carolina Briones
* This code is controlling 7 LED DRIVER M5450 and reading the values in bytes (8 digits).
* You can just try with one!!
*/
int clock = 4;
int dataenable = 5;
int data0 = 6; // PIN-es digitales de la placa conectados al chip
int data1 = 7;
int data2 = 8;
int data3 = 9;
int data4 = 10;
int data5 = 11;
int data6 = 12;
void PulseClock (); // pulse for start
void InitialiseLED();
void readValues();
void setup() {
int i;
digitalWrite (dataenable, HIGH);
beginSerial(19200); // El puerto serie trabajrá a 9600 baudios
pinMode(clock, OUTPUT);
pinMode (dataenable, OUTPUT);
for (i = 0; i < 7; i++) {
pinMode(data0+i, OUTPUT); // Configuración de los PIN-es digitales
}
InitialiseLED();
delayMicroseconds(1000);
digitalWrite (dataenable, LOW);
}
void PulseClock(void) {
delayMicroseconds(50);
digitalWrite(clock, HIGH); // Procedimiento que emite un pulso de reloj
delayMicroseconds(50);
digitalWrite(clock, LOW);
delayMicroseconds(50);
}
void InitialiseLED(void){
int count,i;
for (count = 0;count < 35;count++){
for (i = 0; i < 7; i++) {
digitalWrite(data0 + i, count == 0 ? HIGH : LOW);
}
}
}
int shift = -1;
unsigned int lo[7];
unsigned int hi[7];
int rowread = 0;
int curs = 0;
unsigned char buffer[4];
void loop()
{
int count,i;
while (rowread < 7 && serialAvailable() > 0) {
buffer[curs] = serialRead();
curs++;
if (curs == 4) {
curs = 0;
readValues();
rowread++;
}
}
if (rowread == 7) {
rowread = 0;
// signal start
digitalWrite (dataenable, LOW);
for (i = 0; i < 7; i++) {
digitalWrite(data0 + i, HIGH);
}
PulseClock(); // Envía un pulso de reloj
// first 16 bits
for (count = 0; count < 16; count++) {
for (i = 0; i < 7; i++) {
digitalWrite(data0+i, lo[i] & 0x01);
lo[i] = lo[i] >> 1;
}
PulseClock(); // Envía un pulso de reloj
}
// second 16 bits
for (count = 0; count < 16; count++) {
for (i = 0; i < 7; i++) {
digitalWrite(data0+i, hi[i] & 0x01);
hi[i] = hi[i] >> 1;
}
PulseClock(); // Envía un pulso de reloj
}
// padding to 35 bits:
for (count = 0; count < 3; count++) {
for (i = 0; i < 7; i++) {
digitalWrite(data0+i, LOW);
}
PulseClock(); // Envía un pulso de reloj
}
delayMicroseconds(100);
}
}
void readValues()
{
unsigned char b;
lo[rowread] = 0;
hi[rowread] = 0;
b = buffer[0];
lo[rowread] |= b;
b = buffer[1];
lo[rowread] |= (b << 8);
b = buffer[2];
hi[rowread] |= b;
b = buffer[3];
hi[rowread] |= (b << 8);
}
No comments:
Post a Comment