Prototyping Circuit
Please be sure to check out NeoPixel Guide to get a better understanding of how to power and work with NeoPixels.Use a bread board and alligator clips to connect the components together. You will want to solder header pins onto the 5V Trinket for a secure connection when prototyping on a breadboard.
- GND NeoPixel Ring connects to GND on 5V Trinket
- IN NeoPixel Ring connects to GIO#0
- PWR NeoPixel connects to 5V
- Pin 1 Slide Switch connects to BAT on 5V Trinket
- Pin 2 Slide Switch connects to Positive wire of JST Extender
- Negative wire of JST Extender connects to GND on 5V Trinket
Programming Trinket
Please check out the NeoPixel Arduino Library guide to get a better understanding on how to program your own colors and animations.#include <Adafruit_NeoPixel.h> #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(); } }