Dear reader, thank you for accompanying me on the journey from initial concepts to a finished lighting project in the HCC! I hope that you learned a lot and that you’ll be able to implement my code in your own lighting endeavors.
My biggest personal takeaway from this project is that creative engineering causes creative outcomes. This installation is nothing like my original plan, which was also nothing like my original project proposal. We even completely changed the installation plan on the very day we were installing it. Other than the fact that sparkle lights happened, nothing ended up the way I thought it would- and I’m so glad. This is so much better than my original creative vision!
I hope, when you do your own projects, that you persevere through difficult things like fried microcontrollers and discover projects that are far cooler than what you originally intended to make. You can do a project just like this one with a few wires, a microcontroller, and a string of lights!
The video below is a short clip of the lights in the HCC displaying the Rainbow Comet code from one of my earlier blog posts. The full code currently running is posted in blog post 7.
And, of course, here’s some sparkle lights code, adapted from the original nighttime code for the third floor:
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
#endif
#define PIN 5
#define NUMPIXELS 150
Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
#define DELAYVAL 15
#define DELAYVAL2 50
#define DELAYVAL300 10
#define BIGDELAYLOOP 15400
#define BIGDELAY 13900
void setup() {
#if defined(__AVR_ATtiny85__) && (F_CPU == 16000000)
clock_prescale_set(clock_div_1);
#endif
pixels.begin();
}
void loop() {
for (int g=0; g<12; g++)
{
for(int i=0; i<NUMPIXELS; i++) {
pixels.setPixelColor(i, pixels.Color(0, 0, 0));
pixels.show();
}
for (int q=0; q<2400; q++)
{
int x=0;
int y=0;
int z=120;
for (int t=0; t<50; t++) //red to green
{
for(int i=0; i<NUMPIXELS; i++) {
pixels.setPixelColor(i, pixels.Color(z, x, y));
pixels.show();
}
delay(DELAYVAL2);
z--;
x++;
}
for (int t=0; t<50; t++) //green to blue
{
for(int i=0; i<NUMPIXELS; i++) {
pixels.setPixelColor(i, pixels.Color(z, x, y));
pixels.show();
}
delay(DELAYVAL2);
y++;
x--;
}
for (int t=0; t<50; t++) //blue to red
{
for(int i=0; i<NUMPIXELS; i++) {
pixels.setPixelColor(i, pixels.Color(z, x, y));
pixels.show();
}
delay(DELAYVAL2);
y--;
z++;
}
}
}