element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Hats Off Design Challenge
  • Challenges & Projects
  • Design Challenges
  • Hats Off Design Challenge
  • More
  • Cancel
Hats Off Design Challenge
Blog Music Mullet Blog 2 - So It Begins
  • Blog
  • Forum
  • Documents
  • Files
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Former Member
  • Date Created: 4 Sep 2014 7:32 AM Date Created
  • Views 705 views
  • Likes 1 like
  • Comments 2 comments
  • music_mullet
  • hats_off
  • adafruit
Related
Recommended

Music Mullet Blog 2 - So It Begins

Former Member
Former Member
4 Sep 2014

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

 

So I got Adafruit things in the mail image

  • 1 Gemma
  • 1 Lipo battery charger
  • 1 500 mAh Hour Lipo battery
  • Lots of crocodile clips
  • 1 Photo cell
  • 25m of Conductive thread (metric system Ftw)
  • A small wire piezo
  • 1 fast vibration switch
  • 4 Neopixels
  • 1 tactile on/off switch
  • And 1 Usb cable

 

I wanted to check to make sure that everything works. A kind of Adafruit Hello World if you will.

I’ve never worked with neopixels before so I it was really important to test them to see how bright they were so I could figure out how many I would need if I want to use it as a photo light.

I plugged the charged battery into the battery connector, attached crocodile clips from the Vout pin of the gemma to the plus pin on the neopixel. I attached crocodile clips to the gemma and neopixel ground. Last, I attached crocodile clips between D1 and the input pin of the neopixel. It’s the one with the little arrow pointing in the direction of the next neopixel.

I struggled for a while to get the Gemma to work on my laptop. I have a windows 8 laptop and kept running in to the following error when I tried to upload even when in bootloader mode

avrdude: Error: Could not find USBtiny device (0x1781/0xc9f)

Turned out my timing was just off. I had to wait for the Gemma to reconnect which took about 8 seconds out of the 10 seconds that the red LED blinks and then quickly upload the sketch before the Gemma exits the bootloader. I checked online and it seems quite a few people having been having this problem and it seems to be the fault of windows 8.

I loaded up the strandtest code.

 

#include <Adafruit_NeoPixel.h>


#define PIN 1


// Parameter 1 = number of pixels in strip
// Parameter 2 = pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
//   NEO_KHZ800  800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
//   NEO_KHZ400  400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
//   NEO_GRB     Pixels are wired for GRB bitstream (most NeoPixel products)
//   NEO_RGB     Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)
Adafruit_NeoPixel strip = Adafruit_NeoPixel(4, PIN, NEO_GRB + NEO_KHZ800);


void setup() {
  strip.begin();
  strip.show(); // Initialize all pixels to 'off'
}


void loop() {
  // Some example procedures showing how to display to the pixels:
  colorWipe(strip.Color(255, 0, 0), 50); // Red
  colorWipe(strip.Color(0, 255, 0), 50); // Green
  colorWipe(strip.Color(0, 0, 255), 50); // Blue
  rainbow(20);
  rainbowCycle(20);
}


// 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();
      delay(wait);
  }
}


void rainbow(uint8_t wait) {
  uint16_t i, j;


  for(j=0; j<256; j++) {
    for(i=0; i<strip.numPixels(); i++) {
      strip.setPixelColor(i, Wheel((i+j) & 255));
    }
    strip.show();
    delay(wait);
  }
}


// Slightly different, this makes the rainbow equally distributed throughout
void rainbowCycle(uint8_t wait) {
  uint16_t i, j;


  for(j=0; j<256*5; j++) { // 5 cycles of all colors on wheel
    for(i=0; i< strip.numPixels(); i++) {
      strip.setPixelColor(i, Wheel(((i * 256 / strip.numPixels()) + j) & 255));
    }
    strip.show();
    delay(wait);
  }
}


// Input a value 0 to 255 to get a color value.
// The colours are a transition r - g - b - back to r.
uint32_t Wheel(byte WheelPos) {
  if(WheelPos < 85) {
   return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0);
  } else if(WheelPos < 170) {
   WheelPos -= 85;
   return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3);
  } else {
   WheelPos -= 170;
   return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3);
  }
}

 

 

I prayed to google, and it worked!

 

I connected all 4 neopixels and tried to see if I could take any photos with them. I ended up chasing my cat around who was not at all interested in the bright lights.

The light really gives off a cool effect though. The different colours are all focused on different points and give an effect like you see on photos of galaxies and nebulas.

 

I LOVE GALAXIES AND NEBULAS

 

Just out of interest, I taped a bunch of old LPD6803 LEDS to my camera bag when I photographed an event over the weekend and this is what the light they gave off looked like. I want my hat to do this but be able to choose from different colour patterns when the user chooses image

 

 

image

image

  • Sign in to reply
  • Former Member
    Former Member over 11 years ago in reply to DAB

    Thanks! Was super messy. Luckily didn't short anything. A bigger worry would be not setting my cat on fire with the soldering iron. She's way too curious about what i'm building...

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 11 years ago

    Good post.

     

    Just a note, be very careful with the crocodile clips, they can easily short things out.

     

    DAB

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube