NeoPixel Ring earrings - Christmas Pattern

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
fid
 
Posts: 74
Joined: Wed Sep 25, 2013 3:00 pm

NeoPixel Ring earrings - Christmas Pattern

Post by fid »

Greetings,
I just wanted to share a sketch that I made for the 16 pixel NeoPixel Ring earrings that I made from parts purchased here at Adafruit. I made the earrings for my wife and did an orange circular pattern for Halloween. Yesterday I made a new sketch with alternating red and green colors. Then I added a sparkly flash in a random pattern. The glow was way too bright so I used lower numbers for the colors. Here is a copy of the sketch for you to use.

Code: Select all

/*Random blinky NeoPixel Ring
Red and Green with a sparkle for Christmas
By fid */

#include <Adafruit_NeoPixel.h>

#define N_PIXELS 16
#define LED_PIN 0  //You might have to change this if you didn't use
                             // pin 0 on the Gemma.

int RandomBlinky = 0;
int Brightness = 60;  // Brightness of the pixels is about 60%
                      // I ended up not using the Brightness variable.
int BlinkDelay = 15;
int i = 0;

Adafruit_NeoPixel strip = Adafruit_NeoPixel(16, LED_PIN, NEO_GRB +NEO_KHZ800);

void setup()
{
strip.begin();
//strip.setBrightness(Brightness);  // I ended up not using this.
for (i  = 0; i < N_PIXELS; i++)  // I think this should set the alternating
{                                // Red Green pattern
if (i % 2 == 0)  //Divide by 2. If the remainder is 0 the color is Red.
{                // Otherwise, the color is Green.
  strip.setPixelColor( i,  10, 0, 0);  // Red - Yes, it is very dim.
  strip.show();
}
else
{
  strip.setPixelColor( i, 0, 10, 0);  // Green - It is also dim.
  strip.show();
}
}
}  // end of setup()

void loop()
{
RandomBlinky = random(16);  // Choose a random NeoPixel.
// set the random pixel to white
strip.setPixelColor( RandomBlinky, 35, 35, 35);  //It's a dim White.
strip.show();
delay(BlinkDelay);  //Let the White show for a little bit.
//Set the random pixel back to the color it was, Red or Green
if (RandomBlinky % 2 == 0)
{
  strip.setPixelColor( RandomBlinky, 10, 0, 0);
  strip.show();
}
else
{
  strip.setPixelColor( RandomBlinky, 0, 10, 0);
  strip.show();
}
delay(150);  //Don't do another White blinky for a little bit.
             // Use a lower number to make the blinks happen faster.
} // End of loop()

/*
Instead of doing the brightness using the "strip.setBrightness(Brightness);",
how about setting Red to 150, 0, 0 and Green to 0, 150, 0?
And set the sparkle to 200,200,200.
This way the flash of the sparkle will be brighter than the brightness of the 
rest of the colors on the ring.

Well, that was too bright.  I used lower numbers for the colors in the sketch.
*/
It has a little bit of notation in the sketch so you can see what I was doing and you can edit it to suit you.
Peace,
fid

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: NeoPixel Ring earrings - Christmas Pattern

Post by adafruit_support_rick »

Thanks for posting! How about some action shots (or even a video)?

User avatar
fid
 
Posts: 74
Joined: Wed Sep 25, 2013 3:00 pm

Re: NeoPixel Ring earrings - Christmas Pattern

Post by fid »

Here is a link to a three second video I uploaded to YouTube. It shows the Christmas Blinky pattern in action. I am on dialup so it took about 15 minutes to upload the video. Yes, I live in the middle of nowhere. :?
http://youtu.be/kF8drIPx7KE
It shows up on YouTube as a 4 seconds video. I cannot view it from home it is too choppy.
Perhaps a ten seconds video would be better?

1chicagodave
 
Posts: 564
Joined: Wed Jun 19, 2013 3:35 am

Re: NeoPixel Ring earrings - Christmas Pattern

Post by 1chicagodave »

Video looks good. Nice work!

User avatar
fid
 
Posts: 74
Joined: Wed Sep 25, 2013 3:00 pm

Re: NeoPixel Ring earrings - Christmas Pattern

Post by fid »

OK, I did an 11 seconds video and posted it on YouTube. It took about 22 minutes to upload. :?
http://youtu.be/RoJL0UAwSb0
It should be available now.

User avatar
fid
 
Posts: 74
Joined: Wed Sep 25, 2013 3:00 pm

Re: NeoPixel Ring earrings - Christmas Pattern

Post by fid »

1chicagodave wrote:Video looks good. Nice work!
Thank you 1chicagodave. It is good to know that the video posted correctly.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: NeoPixel Ring earrings - Christmas Pattern

Post by adafruit_support_rick »

Nice! Thanks for the post!

Locked
Please be positive and constructive with your questions and comments.

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”