Black Lives Matter - Action and Equality. ... Adafruit is open and shipping.
0

NeoPixel Digital RGB LED Strip something wrong
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

NeoPixel Digital RGB LED Strip something wrong

by KASEKI on Sun Jan 12, 2020 10:59 pm

Hello, I did receive NeoPixe Digital RGB LED Stripb (invoice No.2223406, MNP:2540 white 60 LED 2m).
Then I did pre-check NeoPixe, only 8 LEDs are flashing.
Other LEDs not ON.
I checked input volte which is 5.3V DC.
Configuration is followed.
https://learn.adafruit.com/firewalker-l ... it-diagram

Photo is attachment file.

Sketch is followed.
Code: Select all | TOGGLE FULL SIZE
#include <Adafruit_NeoPixel.h>
 
const int analogInPin = A9;  // Analog input pin that the potentiometer is attached to
Adafruit_NeoPixel strip = Adafruit_NeoPixel(10, 6, NEO_GRB + NEO_KHZ800);
int sensorValue = 0;        // value read from the pot
 
void setup() {
  // initialize serial communications at 9600 bps:
  Serial.begin(9600);
 pinMode(9, INPUT_PULLUP);
   strip.begin();
  strip.show(); // Initialize all pixels to 'off'
 
}
 
void loop() {
  // read the analog in value:
  sensorValue = analogRead(analogInPin);             
  // print the results to the serial monitor:
  Serial.print("sensor = " );                       
  Serial.println(sensorValue);     
 
if (sensorValue < 100){
  Serial.println("leds triggered");
colorWipe(strip.Color(255, 0, 0), 25);
colorWipe(strip.Color(0, 0, 0), 25);

                   
}
 
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);
  }
}
Attachments
スクリーンショット 2020-01-13 11.50.06.png
スクリーンショット 2020-01-13 11.50.06.png (885.88 KiB) Viewed 72 times

KASEKI
 
Posts: 4
Joined: Fri Dec 13, 2019 8:35 pm

Re: NeoPixel Digital RGB LED Strip something wrong

by dastels on Mon Jan 13, 2020 12:59 pm

There are several potential/likely problems:

1. You're initializing the strip to use 10 neopixels.

Change the first argument of:
Code: Select all | TOGGLE FULL SIZE
Adafruit_NeoPixel strip = Adafruit_NeoPixel(10, 6, NEO_GRB + NEO_KHZ800);

to be how many pixels are in your strip, which sounds like 120 (2m of 60 pixel/meter strip).


2. With that many pixels, you will run into power issues.

This could also be a problem you are seeing (especially if it is 8 of the specified 10 pixels that are lighting. You'll need an external power supply. 5v 4A is probably adequate unless you plan to have all the pixels bright and/or white. In that case you'll need a 5v at 6 or 7 A supply.


3. The Data signal for NeoPixels needs to be close to their power voltage.

So if you have 3.3v logic as the Flora does, you should be powering the pixels with 3.3v (or slightly over). If you power the strip with 5v, you'll need a level shifter https://www.adafruit.com/product/1787 to convert the 3.3v signal to a 5v signal. See https://learn.adafruit.com/neopixel-levelshifter

That's a lot of info, but NeoPixels can be picky.

For all things NeoPixel, please see https://learn.adafruit.com/adafruit-neopixel-uberguide

Dave

dastels
 
Posts: 3030
Joined: Tue Oct 20, 2015 3:22 pm

Re: NeoPixel Digital RGB LED Strip something wrong

by KASEKI on Sat Jan 18, 2020 8:51 pm

Dear dastels,
Thank you for your advice.
As your following advice, this problem is solved.
(I change parameter 10 to 20).

==============================================
1. You're initializing the strip to use 10 neopixels.

Change the first argument of:
CODE: SELECT ALL | TOGGLE FULL SIZE
Adafruit_NeoPixel strip = Adafruit_NeoPixel(10, 6, NEO_GRB + NEO_KHZ800);

KASEKI
 
Posts: 4
Joined: Fri Dec 13, 2019 8:35 pm

Re: NeoPixel Digital RGB LED Strip something wrong

by dastels on Sat Jan 18, 2020 9:44 pm

Excellent!

dastels
 
Posts: 3030
Joined: Tue Oct 20, 2015 3:22 pm

Please be positive and constructive with your questions and comments.