Things used in this project

Parts & Materials:
Adafruit Trinket - Mini Microcontroller - 3.3V Logic - MicroUSB
×1
Adafruit Diffused Green 10mm LED
×2
Adafruit Diffused Blue 10mm LED
×1
Adafruit Diffused Green 10mm LED
×2
Mfr 25frf52 100r sml
Resistor 100 ohm
×4
Adafruit Lithium Ion Polymer Battery - 3.7v 500mAh
×1
Software apps and online services:
Tinkercad
Ide web
Arduino IDE
Hand tools and fabrication machines:
3drag
3D Printer (generic)
09507 01
Soldering iron (generic)
Hy gluegun
Hot glue gun (generic)

Custom parts and enclosures

Star Topper Front
Star Topper Back

Schematics

Custom protoboard
Oxb3hwmrbbvst93lyckw

Code

LED PatternsArduino
Patterns for the flashing LEDs
 /*
Star Topper
by Brent
*/

int led = 0; // LED 1 position
int led1 = 1; // LED 2 position
int led2 = 2; // LED 3 position
int led3 = 3; // LED 4 position
int led4 = 4; // LED 5 position
int count = 0; // Will use while loop for stepping through the animations
int factor = 200; // For use with the speed up and slow down trace effect

// the setup routine runs on reset:
void setup() {
 // initialize the digital pin as an output.
 pinMode(led, OUTPUT);
 pinMode(led1, OUTPUT);
 pinMode(led2, OUTPUT);
 pinMode(led3, OUTPUT);
 pinMode(led4, OUTPUT);
}

// the whole loop runs forever:
void loop() {
 while(count < 10) {
 digitalWrite(led, HIGH); 
 delay(100);
 digitalWrite(led, LOW);
 delay(100);
 digitalWrite(led1, HIGH); 
 delay(100);
 digitalWrite(led1, LOW);
 delay(100);
 digitalWrite(led2, HIGH); 
 delay(100);
 digitalWrite(led2, LOW);
 delay(100);
 digitalWrite(led3, HIGH); 
 delay(100);
 digitalWrite(led3, LOW);
 delay(100);
 digitalWrite(led4, HIGH); 
 delay(100);
 digitalWrite(led4, LOW);
 delay(100);
 count++;
 }
 while(count < 20) {
 digitalWrite(led4, HIGH); 
 delay(100);
 digitalWrite(led4, LOW);
 delay(100);
 digitalWrite(led3, HIGH); 
 delay(100);
 digitalWrite(led3, LOW);
 delay(100);
 digitalWrite(led2, HIGH); 
 delay(100);
 digitalWrite(led2, LOW);
 delay(100);
 digitalWrite(led1, HIGH); 
 delay(100);
 digitalWrite(led1, LOW);
 delay(100);
 digitalWrite(led, HIGH); 
 delay(100);
 digitalWrite(led, LOW);
 delay(100);
 count++;
 }
 while(count < 30) {
 digitalWrite(led, HIGH); 
 delay(100);
 digitalWrite(led, LOW);
 delay(100);
 digitalWrite(led2, HIGH); 
 delay(100);
 digitalWrite(led2, LOW);
 delay(100);
 digitalWrite(led4, HIGH); 
 delay(100);
 digitalWrite(led4, LOW);
 delay(100);
 digitalWrite(led1, HIGH); 
 delay(100);
 digitalWrite(led1, LOW);
 delay(100);
 digitalWrite(led3, HIGH); 
 delay(100);
 digitalWrite(led3, LOW);
 delay(100);
 count++;
 }
 while(count < 40) {
 digitalWrite(led, HIGH); 
 delay(100);
 digitalWrite(led1, HIGH); 
 delay(100);
 digitalWrite(led2, HIGH); 
 delay(100);
 digitalWrite(led3, HIGH); 
 delay(100);
 digitalWrite(led4, HIGH); 
 delay(100);
 digitalWrite(led4, LOW);
 delay(100);
 digitalWrite(led3, LOW);
 delay(100);
 digitalWrite(led2, LOW);
 delay(100);
 digitalWrite(led1, LOW);
 delay(100);
 digitalWrite(led, LOW);
 delay(100);
 count++;
 }
 while(count < 50) {
 digitalWrite(led4, HIGH); 
 delay(100);
 digitalWrite(led3, HIGH); 
 delay(100);
 digitalWrite(led2, HIGH); 
 delay(100);
 digitalWrite(led1, HIGH); 
 delay(100);
 digitalWrite(led, HIGH); 
 delay(100);
 digitalWrite(led, LOW);
 delay(100);
 digitalWrite(led1, LOW);
 delay(100);
 digitalWrite(led2, LOW);
 delay(100);
 digitalWrite(led3, LOW);
 delay(100);
 digitalWrite(led4, LOW);
 delay(100);
 count++;
 }
 while(count < 67) {
 digitalWrite(led, HIGH); 
 delay(factor);
 digitalWrite(led1, HIGH); 
 delay(factor);
 digitalWrite(led2, HIGH); 
 delay(factor);
 digitalWrite(led3, HIGH); 
 delay(factor);
 digitalWrite(led4, HIGH); 
 delay(factor);
 digitalWrite(led, LOW);
 delay(factor);
 digitalWrite(led1, LOW);
 delay(factor);
 digitalWrite(led2, LOW);
 delay(factor);
 digitalWrite(led3, LOW);
 delay(factor);
 digitalWrite(led4, LOW);
 delay(factor);
 count++;
 factor -= 10;
 }
 while(count < 80) {
 digitalWrite(led, HIGH); 
 delay(factor);
 digitalWrite(led1, HIGH); 
 delay(factor);
 digitalWrite(led2, HIGH); 
 delay(factor);
 digitalWrite(led3, HIGH); 
 delay(factor);
 digitalWrite(led4, HIGH); 
 delay(factor);
 digitalWrite(led, LOW);
 delay(factor);
 digitalWrite(led1, LOW);
 delay(factor);
 digitalWrite(led2, LOW);
 delay(factor);
 digitalWrite(led3, LOW);
 delay(factor);
 digitalWrite(led4, LOW);
 delay(factor);
 count++;
 }
 while(count < 97) {
 digitalWrite(led4, HIGH); 
 delay(factor);
 digitalWrite(led3, HIGH); 
 delay(factor);
 digitalWrite(led2, HIGH); 
 delay(factor);
 digitalWrite(led1, HIGH); 
 delay(factor);
 digitalWrite(led, HIGH); 
 delay(factor);
 digitalWrite(led4, LOW);
 delay(factor);
 digitalWrite(led3, LOW);
 delay(factor);
 digitalWrite(led2, LOW);
 delay(factor);
 digitalWrite(led1, LOW);
 delay(factor);
 digitalWrite(led, LOW);
 delay(factor);
 count++;
 factor += 10;
 }
 while(count < 100) {
 digitalWrite(led4, HIGH); 
 digitalWrite(led3, HIGH); 
 digitalWrite(led2, HIGH); 
 digitalWrite(led1, HIGH); 
 digitalWrite(led, HIGH); 
 delay(200);
 digitalWrite(led4, LOW);
 digitalWrite(led3, LOW);
 digitalWrite(led2, LOW);
 digitalWrite(led1, LOW);
 digitalWrite(led, LOW);
 delay(200);
 count++;
 }
 factor = 200;
 count = 0;
}

Credits

Tmp image 0?auto=compress%2cformat&w=60&h=60&fit=min
Brent Chapman

Infosec professional with a woodworking shop, CNC machine, 3D printer and electronics bench.

Contact

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Add projectSign up / Login
Community Projects Magazine Maker Faire Shop Share