Hardware Reference
In-Depth Information
Now take that line and change it to
seq[byte] = (seq[byte] & (1 << bit) ) ^ (1 << bit)
You might also want to change the title of the window and the colour scheme at the start so
you can distinguish between the two programs. Also, save it under a diferent name. What
this line now does is clear out the sequence value for all bits except the bit you have clicked,
and then it toggles that bit. So if any other bit has been set in that step, it is cleared, and the
bit you have clicked is toggled. his prevents you from setting more than one strip to be lit at
any one time. However, there is still a slight danger because if you click the invert control, all
the outputs but one will be on. To be on the safe side you should remove the following line
(10 lines down from the one you just changed):
seq[a] ^= 0xff
To tidy up the screen display you should remove the call to drawControl that sets up the
invert control in the setupScreen function. You don't have to buy a strip 0.7 meter long; if
you want, you can join strips together if you cannot buy them in the length you want.
Now all you need to do is mount your light strips in some way - maybe a display board above
the decks, or hanging down from the ceiling. I mounted the eight strips on an 8 × 10-inch
piece of MDF painted black. I arranged them in a fan shape over half a circle. his would
stand up nicely under my monitor. he display is startlingly diferent depending on what you
put in front of the LEDs. If you use nothing, they are very raw but do shed a lot of light. A
thin styrene sheet of 0.5mm or less thickness acts as a good difuser if placed close to the
LEDs. However, if you set it just a few inches in front of them, the difusion is much greater,
and you no longer see the individual lights but bars of colour. Finally another good difuser is
a few layers of clear bubble wrap, the round bubbles in it nicely complementing the individ-
ual round LEDs. Your imagination, design skill and venue will allow you to put these strips,
be they short or long, into many a pleasing coniguration. However, if you want to cover the
dance loor with them, you will have to install them behind acrylic sheets to prevent their
being stamped on.
Making the Lights Move
Now so far you have looked at stepping the sequence along using the internal timers or an
external push button, and if that is as far as you want to take this project, then ine. However,
the next step is to have the music drive the change in sequence. Unfortunately this may not
work as well as you might be expecting, but you can make a good stab at things relatively easily.
Search WWH ::




Custom Search