Show Posts
Pages: 1 ... 6 7 [8]
106  Forum 2005-2010 (read only) / Exhibition / Re: LED matrix on: August 09, 2010, 12:32:11 pm
thanks - i actually used two led's per ball one on either side of the cable. the cable itself is a 10 core ribbon flex. the installation was for a night called deconstruct we organised at the venue i run with friends here in liverpool. on the night it was used as a lighting feature for the main space, i am currently developing a number of live performances with dancers utilising the system, however i am hoping to be able to control it over xbee live, so that the dancers position, rotation etc can control different parameters of the system (i.e. the lights could follow them around the space). The code utilises the wiring library and simply maps the matrix onto 125 midi notes, if i wanted to use more lights i think i would need to use more than one midi channel. i chose to go down the Ableton Live route as it gives you a very easy way of programming patterns and controlling them live, including looping different points, adding delay effects and controlling the tempo.

the code is as follows:
Code:
#include <Sprite.h>
#include <Matrix.h>
#include <MIDI.h>

Matrix myMatrix = Matrix(4, 3, 2, 2);


int midiNote;
int x;
int y;



void setup() {
  MIDI.begin();
  myMatrix.clear();

}

void loop() {
  if (MIDI.read()) {
    midiNote = MIDI.getData1();
    
    if (midiNote <= 64) {
      convertMidiToCoordinates(midiNote);

      switch (MIDI.getType()) {
        case NoteOn:
          myMatrix.write(x, y, HIGH);
          break;
        case NoteOff:
          myMatrix.write(x, y, LOW);
          break;
      }
    } else {
      midiNote -= 64;
      convertMidiToCoordinates(midiNote);

      switch (MIDI.getType()) {
        case NoteOn:
          myMatrix.write(x+8, y, HIGH);
          break;
        case NoteOff:
          myMatrix.write(x+8, y, LOW);
          break;
      }
    }
  }
 }

void convertMidiToCoordinates(int midiNote) {
  x = midiNote / 8;
  y = midiNote % 8;
}


107  Forum 2005-2010 (read only) / Exhibition / Re: LED matrix on: August 09, 2010, 10:43:37 am
thanks for the replies - i just used a section of a four tet song but did not realise that youtube was so efficient at recognizing the music and blocking it. will have to put up a version with some different music. but i also have it up on my website here:

http://venyakrutikov.net/led_matrix.html
108  Forum 2005-2010 (read only) / Exhibition / LED matrix on: August 08, 2010, 07:55:43 pm
hello

been meaning to put up some documentation of a project i completed for an event we hosted at the kazimier in liverpool called Deconstruct (19/06). The LED matrix consists of 25 strings: each carrying 5 x 1W led lights. The LEDs are encased in 100mm acrylic spheres. The matrix itself is controlled by Arduino and 2 multiplexing chips (max 7219) whilst the patterns were sequenced and controlled live over midi using ableton live, with each light assigned its own individual midi note. the whole project took about 4 weeks to build, and although there were some teething problems (mainly to do with power distribution to drive all the lights), the matrix works. The strings themselves have d-sub connectors which makes it really easy to hang in any configuration or shape.





109  Forum 2005-2010 (read only) / Exhibition / Re: the Kronos on: February 22, 2010, 11:19:17 am
we are just opposite the pleasure rooms with the main entrance on wolstenholme square.
here is a link to our listings for the forthcoming month. i think we will keep it up until i finish the free hanging led matrix cube that i am working on at the moment. it will only be 125 LEDs but it will be nearly 2.5m wide by 2.5m in height which will have quite a presence.

http://www.thekazimier.co.uk/listings.htm
110  Forum 2005-2010 (read only) / Exhibition / Re: the Kronos on: February 22, 2010, 07:16:28 am
it was a real relief to see it work, especially since i wasn't 100% sure of all of my components (right resistors etc.) but when it all worked in rehearsals and then also on the night, it was a real relief. we have kept it up since the initial event and use it as a lighting feature for bands sometimes.
111  Forum 2005-2010 (read only) / Exhibition / Re: the Kronos on: February 21, 2010, 09:55:53 am
afraid so - it was for our new years eve event.
here is a little video of it:

http://www.thekazimier.co.uk/kronos_returns_video.htm

112  Forum 2005-2010 (read only) / Exhibition / the Kronos on: February 21, 2010, 09:49:35 am
just wanted to share a little video of a contraption we recently built for an event we held called The Kronos Returns here in Liverpool at the Kazimier. the theme of the event was to do with time travelling and so we needed a good space ship. the kronos was built out of wood and perspex and can open and close - on the night performers were lowered down out of it. The kronos has 64 ultra bright LED's and 8 x PAR 36 pin spots. All the LEDs were controlled through arduino using a MAX7219 multiplexing chip, with the pinspots being turned on and off using relays. The arduino was in turn controlled through midi allowing for the entire lighting show to be sequenced in ableton live. the kronos also had a projector mounted above it and the image came up really well on the white perspex. using ableton was great as it allowed for real time sequencing and manipulation over all the individual LEDs. I learnt quite a bit from doing this, mainly that trying to wire in that many LEDs is a lot of work! i am now building a larger system and will be using multicore flex with scsi style connectors, making the whole thing more modular. Also weirdly, if i turned on the external power supply for the LEDs before I turned on the arduino the midi would not work well. I guess this must be to do with the way i grounded everything. below is the code I used (thanks to Asa Calow for all the help):






Code:
#include <Sprite.h>
#include <Matrix.h>
#include <MIDI.h>

Matrix myMatrix = Matrix(6, 3, 2);

int i;

int midiNote;
int x;
int y;
int spotNumber;
int spotStartingPin = 8; // the first pin which controls a spot
int numberOfSpots = 8; // the total number of spots you want to control.


void setup() {
  MIDI.begin();
  myMatrix.clear();
  for (i = spotStartingPin; i <= spotStartingPin+numberOfSpots-1; i++) {
    pinMode(i, OUTPUT);

  }
}

void loop() {
  if (MIDI.read()) {
    midiNote = MIDI.getData1();
    // if the midiNote is 64 or under send it to the led driver
    if (midiNote <= 64) {
      convertMidiToCoordinates(midiNote);

      switch (MIDI.getType()) {
        case NoteOn:
          myMatrix.write(x, y, HIGH);
          break;
        case NoteOff:
          myMatrix.write(x, y, LOW);
          break;
      }
    } else {
      // if we're here the midi note is higher than 64 so send it to a spot
      spotNumber = midiNote - 66 + spotStartingPin; // so midiNote 65 = spotStartingPin etc.

      switch (MIDI.getType()) {
        case NoteOn:
          // switch on the spot
          digitalWrite(spotNumber, HIGH);
          break;
        case NoteOff:
          // switch off the spot
          digitalWrite(spotNumber, LOW);
          break;
    }
  }
 }
}
void convertMidiToCoordinates(int midiNote) {
  x = midiNote / 8;
  y = midiNote % 8;
}


113  Forum 2005-2010 (read only) / Exhibition / Re: The Spinning Fortunagraph on: November 30, 2009, 06:33:50 pm
sorry to take so long - here is the code for the fortunagraph. It takes the tachometer reading and outputs that as a midi cc value at the same time the value is used to control the brightness of LED's plugged into it. There is also a little snippet of code there that triggers a midi noteON once the tachometer gets over a certain speed (in the video online this part of the code is responsible for triggering the moving images projected onto the surface of the machine once the fortunagraph gets up to speed). Appologies for the messiness of the code - it is a cut and paste combination of a lot of different ideas.


Code:
 /*
 * Optical Tachometer
 *
 * Uses an IR LED and IR phototransistor to implement an optical tachometer.
 * The IR LED is connected to pin 13 and ran continually. A status LED is connected
 * to pin 12. Pin 2 (interrupt 0) is connected across the IR detector.
 *
 *
 */
//#define DEBUG      

int ledPin = 13;                // IR LED connected to digital pin 13
int statusPin = 12;  // LED connected to digital pin 12
int lightPin1 = 6;
int lightPin2 = 9;
int lightPin3 = 10;
int lightPin4 = 11;
int brightness = 0;
int delay_time = 40; // delay for this amount each write cycle.
int noteDown = LOW;
byte MIDI_channel = 0;
byte cc_number = 0;
byte incomingByte;
byte button;
byte note;
byte printing_byte = 0;
int Value = 0;
int midi_pitch = 0;
int mappedrpm = 0;
int state=0;
#ifdef DEBUG
const int DEBUG_RATE = 9600;        // Serial debugging communicates at 9600 baud
const int SERIAL_PORT_RATE = DEBUG_RATE;
#else
const int MIDI_BAUD_RATE = 31250;   // MIDI communicates at 31250 baud
const int SERIAL_PORT_RATE = MIDI_BAUD_RATE;
#endif



volatile byte rpmcount;
volatile int status;

unsigned int rpm;

unsigned long timeold;

// flag switching stuff
boolean top_speed_reached = false;
int on_threshold = 70;
int off_threshold = 50;

void rpm_fun()
{
  //Each rotation, this interrupt function is run twice, so take that into consideration for
  //calculating RPM
  //Update count
  rpmcount++;

  //Toggle status LED  
  if (status == LOW) {
    status = HIGH;
  }
  else {
    status = LOW;
  }
  digitalWrite(statusPin, status);
}

void setup()
{
  state = 0;

  Serial.begin(SERIAL_PORT_RATE);
  //Interrupt 0 is digital pin 2, so that is where the IR detector is connected
  //Triggers on FALLING (change from HIGH to LOW)
  attachInterrupt(0, rpm_fun, FALLING);

  //Turn on IR LED
  pinMode(ledPin, OUTPUT);
  digitalWrite(ledPin, HIGH);

  //Use statusPin to flash along with interrupts
  pinMode(statusPin, OUTPUT);

  rpmcount = 0;
  rpm = 0;
  timeold = 0;
  status = LOW;


}

void loop()
{
  //Update RPM every second
  delay(800);
  //Don't process interrupts during calculations
  detachInterrupt(0);
  //Note that this would be 60*1000/(millis() - timeold)*rpmcount if the interrupt
  //happened once per revolution instead of twice. Other multiples could be used
  //for multi-bladed propellers or fans in this case the tachometer has 20 holes for greater accuracy
  rpm = 3*1000/(millis() - timeold)*rpmcount;
  timeold = millis();
  rpmcount = 0;
  attachInterrupt(0, rpm_fun, FALLING);
  brightness = map(rpm, 0, 36, 0, 255);
  analogWrite(lightPin1, brightness);
  analogWrite(lightPin2, brightness);
  analogWrite(lightPin3, brightness);
  analogWrite(lightPin4, brightness);
  printing_byte = map(rpm, 0, 36, 0, 127);{
  midiOUT(0xB0, 7, printing_byte);
  }
  
  if (!top_speed_reached) {
    if (printing_byte >= on_threshold) {
      top_speed_reached = true;
      midiOUT(0x90, 60, 127);
    }
  } else {
    if (printing_byte <= off_threshold) {
      top_speed_reached = false;
      midiOUT(0x90, 45, 127);
    }
  }
  
}




  //Write it out to serial port
  //Restart the interrupt processing
  


void midiOUT(char command, char value1, char value2) {
  Serial.print(command, BYTE);
  Serial.print(value1, BYTE);
  Serial.print(value2, BYTE);

}

114  Forum 2005-2010 (read only) / Exhibition / Re: The Spinning Fortunagraph on: November 19, 2009, 06:42:49 am
thank you for your kind workds - it did take a while. I worked mainly on the arduino and video side of things whilst my friend did all the construction, we built the whole thing in a 3D program first and were able to work to the same specifications. All the components of the piece only came together and worked less than 24 hours before the event itself. Will gather all the bits of code and schematics and post them up soon.
115  Forum 2005-2010 (read only) / Exhibition / The Spinning Fortunagraph on: November 18, 2009, 04:15:01 pm
hello

wanted to share a project I have recently completed called The Spinning Fortunagraph as part of the Fantascopic Fair held at The Kazimier (Sep 26). The device is an interactive wheel of fortune that can (if interpreted correctly by an operator) predict the future. Well... sort of. It draws heavily on tarot card symbols and luck. The fortunagraph utilises 2 arduinos (i am sure we could have done it with one but i ran out of time and had a spare arduino). The first works as an RFID reader and reads the RFID cards placed onto it - there are 8 cards in total with each one triggering a different animation. This is done using an external piece of software called Modul8 and the RFID signal is converted to MIDI for this. The animation triggered symbolises the tarot card with which the user will be playing. The second arduino is inside the machine and works predominatly as an optical tachometer, its job is to measure the speed of the rotation and control variable video / audio parameters. It was really interesting and challenging building it, especially since it was exhibited as part of a much bigger evening with over 600 guests attending - so it needed to be pretty robust. The device comes with an operator - a sort of wise guru who explains the different symbols as they come and interprets the final outcomes meaning - with suprising accuracy.

I have built a little site that has a short video below:

http://www.fortunagraph.co.uk



thank you very much to Asa Calow and Adrian McEwen for all the help
116  Forum 2005-2010 (read only) / Exhibition / Re: Levitating magnet and improved Serial library on: March 06, 2009, 07:43:12 am
this is a great project and really well executed. I have a quick question about the work you have done with altering the serial speed. The project I am currently working on involves controlling individual LED's through MIDI over the USB interface on the Arduino board - the results are great but the LED's sometimes stick i.e. they stay on after the key has been depressed - this only happens when a lot of keys are pressed in succession and I think the problem must be with the serial speed. Would it be just a matter of downloading and installing your updated version or will I also have to make amendments to my Arduino script to recognise the new speeds available.

thank you for your time
Pages: 1 ... 6 7 [8]