I like projects! I NEED projects!
I’ve wanted to do something in the wearables category for a while, but couldn’t think of something. I was out at the mall one evening with my beautiful wife looking through some of the department stores. I decided to call my sister-in-law (for a reason I can’t remember right now) and the idea popped into my head that I should make her some of the neopixel earrings I’ve seen in the Adafruit Learning System. So I told her I was going to make them and when I got home I went onto Adafruit’s site to purchase what I would need.
The original plans for the earrings include neopixel rings, but I noticed that they had just released a new neopixel “platform” called the “Jewel”. This has 7 neopixels arranged in a circle with 1 more in the middle. I thought these would be more fun to have than the rings, so they were added instead. The only other parts you need are a tiny lipo battery and of course an Adafruit Gemma. (Don’t forget the charger for the batteries as well if you don’t have one)
I feel bad that I didn’t take pictures of the entire process, but it’s really, really simple. The first thing I did was shorten the battery leads. There’s no need for all that length of wire. After that, I wired the Jewel to the Gemma with silicon wire with enough room to slide the battery between the 2. (They are back to back.) 3vo on the Gemma to +5V on the Jewel, Ground to Ground & D0 on the Gemma to input on the Jewel.
To keep them together, I did a no-no and used hot glue. You slide the battery in position and make sure it all will align well (I aligned one of the mounting holes on the Jewel to D1 on the Gemma). Slightly lift the battery on one side so you have room to place the hot glue on the back side of the Gemma, then press the battery down into place. Repeat the same process with the Jewel on the battery making sure it’s aligned.
For the code, I took what was given on the Adafruit tutorial for the ring earrings and modified it to only sparkle and to sparkle specifically in teal (my sister-in-law’s favorite color).
// Low power NeoPixel earrings example. Makes a nice blinky display
// with just a few LEDs on at any time…uses MUCH less juice than
// rainbow display!#include
#define PIN 0
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(7, PIN);
uint8_t mode = 0, // Current animation effect
offset = 0; // Position of spinny eyes
uint32_t color = 0xffae00; // Start red
uint32_t prevTime;void setup() {
pixels.begin();
pixels.setBrightness(60); // 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(7);
pixels.setPixelColor(i, pixels.Color(0,128,128));
pixels.show();
delay(100);
pixels.setPixelColor(i, 0);
break;}
}
Add some earring pieces from Walmart and they should sparkle like these: