Go Down

Topic: Neopixels not working properly (Read 1 time) previous topic - next topic

ardandfun

I have finished the code. It uploaded properly. If I move the fabric around they all light up but end up with two red Neopixels illuminated. Maybe the conductive thread is messed up? I have not been excessively gentle with the  fabric as I put it in a bag and take it with me. Since they all light up I was thinking it is the thread. Not sure?




#include <Adafruit_NeoPixel.h>
# define PIXEL_COUNT 8   //number of pixels
# define PIXEL_PIN 3    //Digital 3 pin connected to the Neopixels
Adafruit_NeoPixel strip = Adafruit_NeoPixel (PIXEL_COUNT, PIXEL_PIN, NEO_RGB + NEO_KHZ800);






void setup() {
 strip.begin();   // Initialize as  OUTPUT
 strip.clear();    // Initialize all pixels to 'off'
 strip.show();  // turn neopixels off

}

void loop() {
  // this will have the NeoPixel cycle through red,green,blue each showing for half a second
  strip.setPixelColor(3, 0, 255, 0); // set color to green
  strip.show();  // send color to NeoPixel
  delay(500);   // show color for 500 milliseconds
  strip.setPixelColor(6, 0,  0,  255);   // set color to blue
  strip.show();    // send color to neopixel
  delay(500);     // show color for 500 milliseconds
  strip.setPixelColor(1, 255, 0, 0);   // set color to red
  strip.show();   // send color to neopixel
  delay (500);   //  show color for 500  milliseconds
  strip.setPixelColor (4, 0, 0, 255);  //  set color to blue
  strip.show();   //  send color to neopixel
  delay(500);  //  show color for 500 milliseconds
  strip.setPixelColor(0, 0, 255, 0 );     //  set color to green
  strip.show();  //   send color to neopixel
  delay(500);  //  show color for 500 milliseconds
  strip.setPixelColor( 5,  255, 0,  0); //  set color to red
  strip.show();  //   send color to neopixel
  delay(500);  // show color for 500  milliseconds
  strip.setPixelColor(2, 0,0,255); //  set color to blue
  strip.show();  //  send color neopixel
  delay(500);    // show color for 500 milliseconds
  strip.setPixelColor(7,0,255,0);   // set color to green
  strip.show(); //  send color to neopixel
  delay(500); //  show color for 500milliseconds

 
}
 
 

Go Up