FINAL: Illuminated 3D Printed New York Sculpture

In Process Images:

IMG_1718IMG_1719IMG_1721IMG_1732IMG_1733

Failed Prints:

IMG_1723IMG_1725IMG_1726

Arduino Code for NeoPixel w/ 5V Trinked by Adafruit:

Solid Color (No Animation Code):

#include 
 
#define N_PIXELS 24 // Number of pixels you are using
#define LED_PIN 0 // NeoPixel LED strand is connected to GPIO #0 / D0
 
Adafruit_NeoPixel strip = Adafruit_NeoPixel(N_PIXELS, LED_PIN, NEO_GRB + NEO_KHZ800);
 
void setup() {
 strip.begin();
 
 // you can change the brightness to lower if its too bright!
 strip.setBrightness(255); // Set LED brightness 0-255
 colorWipe(strip.Color(255, 255, 255),0); // fill the strip with all white
 strip.show(); // Update strip
}
 
void loop() {
}
 
// Fill the dots one after the other with a color
void colorWipe(uint32_t c, uint8_t wait) {
 for(uint16_t i=0; i<strip.numPixels(); i++) {
 strip.setPixelColor(i, c);
 strip.show();
 }
}

Any Color w/ Animation Code:

#include 

#define PIN 0

Adafruit_NeoPixel pixels = Adafruit_NeoPixel(24, PIN);

uint8_t mode = 1, // Current animation effect
 offset = 0; // Position of spinny eyes
uint32_t color = 0x8A00EF; // Start red
uint32_t prevTime;

void setup() {
 pixels.begin();
 pixels.setBrightness(150); // 1/3 brightness
 prevTime = millis();
}

void loop() {
 uint8_t i;
 uint32_t t;

 switch(mode) {

 case 0: // Random sparks - just one LED on at a time!
 i = random(20);
 pixels.setPixelColor(i, color);
 pixels.show();
 delay(10);
 pixels.setPixelColor(i, 0);
 break;
 
 case 1: // Spinny wheels (8 LEDs on at a time)
 for(i=0; i<54; i++) {
 uint32_t c = 0;
 if(((offset + i) & 7) < 4) c = color; // 4 pixels on...  pixels.setPixelColor( i, c); // First eye  pixels.setPixelColor(31-i, c); // Second eye (flipped)  }  pixels.show();  offset++;  delay(90);  break;  }  t = millis();  if((t - prevTime) > 8000) { // Every 8 seconds...
 mode++; // Next mode
 if(mode > 1) { // End of modes?
 mode = 1; // Start modes over
 color >>= 0 ; // Next color R->G->B
 if(!color) color = 0x00ff96; // Reset to red
 }
 for(i=0; i<54; i++) pixels.setPixelColor(i, 0);
 prevTime = t;
 }
}

Final Product:

IMG_1797IMG_1798IMG_1799IMG_1800IMG_1801

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s