I made a circuit a few weeks ago wired just like this circuit:
https://learn.adafruit.com/breath-of-th ... it-diagram
I had put on a code to make it flicker like fire and it was working. I hadn't put the switch on just yet but I am also using a slide switch like the above circuit. I was sticking the prongs into the slots they would be later soldered into. Everything is work fine. I put the project aside for a few weeks. I come back to it realizing I need to add another strip. I soldered the strips together, modify the code to add the additional 60 pixels. Now it will not turn on. The lights on the Trinket board turn on, but the lights on the JST board are dimmer (with my battery, if hooked up to the wall they are brighter). I cut the strips apart thinking that was the problem. No dice. My original circuit no longer works either. Same thing happensHere is the code I am using:
Code: Select all
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
#endif
#define PIN 4
Adafruit_NeoPixel strip = Adafruit_NeoPixel(120, PIN, NEO_GRB + NEO_KHZ800);
// IMPORTANT: To reduce NeoPixel burnout risk, add 1000 uF capacitor across
// pixel power leads, add 300 – 500 Ohm resistor on first pixel’s data input
// and minimize distance between Arduino and first pixel. Avoid connecting
// on a live circuit…if you must, connect GND first.
void setup() {
// This is for Trinket 5V 16MHz, you can remove these three lines if you are not using a Trinket
#if defined (__AVR_ATtiny85__)
if (F_CPU == 16000000) clock_prescale_set(clock_div_1);
#endif
// End of trinket special code
strip.begin();
strip.show(); // Initialize all pixels to ‘off’
}
void loop() {
int r = 255;
int g = 96;
int b = 12;
for(int x = 0; x <30; x++)
{
int flicker = random(0,40);
int r1 = r-flicker;
int g1 = g-flicker;
int b1 = b-flicker;
if(g1<0) g1=0;
if(r1<0) r1=0;
if(b1<0) b1=0;
strip.setPixelColor(x,r1,g1, b1);
}
strip.show();
delay(random(50,150));
}