Random Stuff We Make!
Published © CC BY-NC

Aurora - The Light Show

A cool 30 x 10 ft light show which includes 2 Arduino Mega boards, a hundred single-color LED strips and some SMPS full of AMPERES.

ExpertShowcase (no instructions)560

Things used in this project

Hardware components

Arduino Mega 2560 & Genuino Mega 2560
Arduino Mega 2560 & Genuino Mega 2560
×2
8 Channel Relay Board
×10
LED Strip, 5 m
LED Strip, 5 m
×130
12 volt, 40 AMPS DC Power supply
×2
Jumper wires (generic)
Jumper wires (generic)
×300
Hook Up Wire Kit, 22 AWG
Hook Up Wire Kit, 22 AWG
×50

Software apps and online services

Vixen Lights
Arduino IDE
Arduino IDE
Audacity

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
Hot glue gun (generic)
Hot glue gun (generic)
Mastech MS8217 Autorange Digital Multimeter
Digilent Mastech MS8217 Autorange Digital Multimeter

Story

Read more

Code

Code

Arduino
Arduino IDE Code. Copy, Paste, Change & Burn
#define MAX_CHANNELS 44

int ch;
int state;
int chVal[MAX_CHANNELS] = {0};
int pins[] = {2, 3, 4, 5, 6, 7,8,9,10,11,12,13,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53};

enum states
{
  IDLE,
  DELIM,
  READ,
  DISP
};

void setup()
{
  for (ch=0; ch<MAX_CHANNELS; ch++)
  {
    pinMode(pins[ch], OUTPUT);
   // digitalWrite(pins[ch], LOW);
  }
  
  state = IDLE;
  ch = 0;

 // analogWrite(53,255);  
  
  Serial.begin(57600);
}

void loop()
{  
    while(1)
    {
         for (ch=0; ch<MAX_CHANNELS; ch++)
        {   
          //if (chVal[ch] > 0)
         // {
            digitalWrite(pins[ch], LOW);
            delay(3000);
            digitalWrite(pins[ch], HIGH);
        //  }
        //  else
       //   {
       //     digitalWrite(pins[ch], HIGH);
         // }
            }
    }
  if (Serial.available())
  {
    switch (state)
    {
      case IDLE:  
        ch = 0;
        if (Serial.read() == '+')
        {
          state = DELIM;          
        }
        else
        {
          state = IDLE;
        }
      break;
        
      case DELIM:
        ch = 0;
        if (Serial.read() == '>')
        {
          state = READ;
        }
        else
        {
          state = IDLE;
        }
      break;
      
      case READ:
        chVal[ch++] = Serial.read();
        if (ch >= MAX_CHANNELS)
        {
          ch = 0;
          state = DISP;
        }
      break; 
      
      case DISP:
        state = IDLE;
        for (ch=0; ch<MAX_CHANNELS; ch++)
        {   
          if (chVal[ch] > 0)
          {
            digitalWrite(pins[ch], LOW);
          }
          else
          {
            digitalWrite(pins[ch], HIGH);
          }
        }
      break;
    }
  }
}

Credits

Random Stuff We Make!

Random Stuff We Make!

2 projects • 0 followers
We at RSWM! try to bring Fiction to Reality through projects which are Interactive, Creative & way too simpler in terms of making.

Comments

Add projectSign up / Login