I do not manage to run strip of leds on 1138.

For other supported Arduino products from Adafruit: Shields, accessories, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
e-nodev
 
Posts: 9
Joined: Thu Feb 27, 2014 5:03 am

I do not manage to run strip of leds on 1138.

Post by e-nodev »

Hello,
I do not manage to run the strip of leds Reference ADA1138 (http://www.adafruit.com/products/1138). I does not understand because I manage to run the references ADA1426 (http://www.adafruit.com/product/1426) and 1312 (http://www.adafruit.com/product/1312). I use the same library, maybe is needed a various?
Can you help me?
Thank you
BANNED

My code for 10 leds first ones :

Code: Select all

#include <Adafruit_NeoPixel.h>

#define PIN 6

Adafruit_NeoPixel strip = Adafruit_NeoPixel(10, PIN, NEO_GRB + NEO_KHZ800);

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

void loop()
{
  int intensite = 20;
  // Some example procedures showing how to display to the pixels: Quelques procédures d'exemple montrant comment montrer(afficher) aux pixels :
  colorWipe(strip.Color(intensite, 0, 0), 1000); // Red
  colorWipe(strip.Color(0, intensite, 0), 1000); // Green
  colorWipe(strip.Color(0, 0, intensite), 1000); // Blue  
  colorWipe(strip.Color(intensite, intensite, intensite), 1000);
  //rainbow(20);
  //rainbowCycle(20);
  int reset = 0;
  if(reset==0)
  {
    for(int i=0;i<intensite;i++)
    {
      uint32_t color = strip.Color (i, 0, i); 
      strip.setPixelColor (0, color);//1
      strip.setPixelColor (2, color);//3
      strip.setPixelColor (4, color);//5
      strip.setPixelColor (6, color);//7
      strip.setPixelColor (8, color);//9
      strip.show ();
      delay(50);    
      if (i==intensite)
      {
        reset=1;
      }
    }
  }
  if(reset==0)
  {
    for(int i=intensite;i>0;i--)
    {
      uint32_t color = strip.Color (i, 0, i); 
      strip.setPixelColor (0, color);//1
      strip.setPixelColor (2, color);//3
      strip.setPixelColor (4, color);//5
      strip.setPixelColor (6, color);//7
      strip.setPixelColor (8, color);//9
      strip.show ();
      delay(50);    
      if (i==0)
      {
        reset=0;
      }
    }
  }
}

// Fill the dots one after the other with a color  Remplissez les points l'un après l'autre d'une couleur
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);
  }
}

Attachments
2014-02-27 10.39.29.jpg
2014-02-27 10.39.29.jpg (117.15 KiB) Viewed 279 times
2014-02-27 10.38.07.jpg
2014-02-27 10.38.07.jpg (145.44 KiB) Viewed 279 times
2014-02-25 10.23.56.jpg
2014-02-25 10.23.56.jpg (117.86 KiB) Viewed 279 times

User avatar
adafruit_support_bill
 
Posts: 88088
Joined: Sat Feb 07, 2009 10:11 am

Re: I do not manage to run strip of leds on 1138.

Post by adafruit_support_bill »

The 5v pin from the Arduino will not have enough power to run this strip. You will need a more powerful 5v supply. I would suggest about 2A per meter of this strip (3.5A per meter if you will be running at full intensity white).
Also you should be using a capacitor on the power leads and a resistor on the signal wire as suggested here: http://learn.adafruit.com/adafruit-neop ... -practices

It is possible that the first pixel on the strip is damaged. Try connecting your signal wire to the input of the second pixel and see if the rest of the strip is still good.

User avatar
e-nodev
 
Posts: 9
Joined: Thu Feb 27, 2014 5:03 am

Re: I do not manage to run strip of leds on 1138.

Post by e-nodev »

Hello,
Thank you for your help and your advice. It is exact, the first two LEDs is out of order. Is it possible to pilot 4 meters of band (or more) with an exit of the arduino?
BANNED

User avatar
adafruit_support_bill
 
Posts: 88088
Joined: Sat Feb 07, 2009 10:11 am

Re: I do not manage to run strip of leds on 1138.

Post by adafruit_support_bill »

The Arduino UNO can handle 400-500 pixels, so a 4 meter strip is no problem. You will need a good power supply such as this one: http://www.adafruit.com/products/658
And you should connect power to at least 2 or 3 locations on the strip. See this page for details: http://learn.adafruit.com/adafruit-neop ... uide/power

User avatar
e-nodev
 
Posts: 9
Joined: Thu Feb 27, 2014 5:03 am

Re: I do not manage to run strip of leds on 1138.

Post by e-nodev »

Hello,
Tanks you for your advice.
BANNED

User avatar
e-nodev
 
Posts: 9
Joined: Thu Feb 27, 2014 5:03 am

Re: I do not manage to run strip of leds on 1138.

Post by e-nodev »

Hello,
Can you indicate me the reference for a strip of 2 meters and the reference for a strip of 4 meters?
Thank you
BANNED

User avatar
adafruit_support_bill
 
Posts: 88088
Joined: Sat Feb 07, 2009 10:11 am

Re: I do not manage to run strip of leds on 1138.

Post by adafruit_support_bill »

It is the same link as for i meter. if you specify 2 meters or 4 meters in the quantity field, you will get a 2 or 4 meter length.

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Arduino products from Adafruit”