Hi Jack,
Great, the control portion was the unknown part of this project for me. Professional lighting boards have a massive database of channels and levels, after that, what separates them is how you control and access that database. some allow you to have direct, intuitive control, others you have to jump through hoops to get just to get a light to turn on. for your project, you are going to build a very small database, as i don't think the arduino can replicate a GrandMa and unfortunately your going to have to jump through hoops to change a value.
each channel is an array
each channel will be updated each time through the loop
does each channel change each time through the loop, not necessarily - that's your design
how many channels do you want to run?? i would suggest starting small, and finding out where "the adruino lighting desk" stops working.
how often do you want to update your channel database? real-time, or once a month?
looking below at your tiny database, you could view the horizontal rows as channels, and the vertical columns are 'cues', if you see the patten of numbers, there will be a ramp up on channel 0-3, with an offset of one cue (sort of like a wave effect) channel 4-7 will pop-on at a different value in the same cue. channel 8-9 will do sort of a combination of both.
(i suggest using excel/openoffice to color code you chart so you have a better look at what your numbers are doing, text on a screen is rough)
(and for you experienced coders out there, yes i know there at x-dimension arrays, simple is better in this case )
_Jon
//pseudo-code (check array bounds)
int arraysize = 20;
//database array...
int ch0[] {0,10,20,30,20,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
int ch1[] {0,0,10,20,30,20,10,0,0,0,0,0,0,0,0,0,0,0,0,0}
int ch2[] {0,0,0,10,20,30,20,10,0,0,0,0,0,0,0,0,0,0,0,0}
int ch3[] {0,0,0,0,10,20,30,20,10,0,0,0,0,0,0,0,0,0,0,0}
int ch4[] {0,0,0,0,0,0,40,0,0,0,0,0,50,0,0,0,0,0,0}
int ch5[] {0,0,0,0,0,0,30,0,0,0,0,0,50,0,0,0,0,0,0}
int ch6[] {0,0,0,0,0,0,20,0,0,0,0,0,50,0,0,0,0,0,0}
int ch7[] {0,0,0,0,0,0,10,0,0,0,0,0,50,0,0,0,0,0,0}
int ch8[] {0,20,30,40,50,60,0,0,0,0,0,0,50,0,0,0,0,0,0}
int ch9[] {0,0,20,30,40,50,60,0,0,0,0,0,50,0,0,0,0,0,0}
//...
setup(){
(setup dmx stuff)
(setup input / output stuff)
}
loop(){
i++
//careful, if you try to read out side of your array, you will crash.
if (i>arraysize)
{i=0;
}
dmx0 = ch0[i];
delay(5);
dmx1 = ch1[i]
delay(5);
dmx2 = ch2[i]
delay(5);
dmx3 = ch3[i]
delay(5);
dmx4 = ch4[i]
delay(5);
dmx5 = ch5[i]
delay(5);
dmx6 = ch6[i]
delay(5);
dmx7 = ch7[i]
delay(5);
dmx8 = ch8[i]
delay(5);
dmx9 = ch9[i]
delay(5);
//and here's a hint for real-time control
dmx10 = analogRead(knob_pin);
}