Hi people! I am very new in this,

Hi people!

I am very new in this, and I would like to turn on a ws2811 all white because I have the feeling that it is not working correctly.

I have just downloaded FastLED 3.0.3
I use arduino mega 2560
windows 7

I have just the first part of the code done:

#include <FastLED.h>
#define NUM_LEDS 100
#define DATA_PIN 37

CRGB leds[NUM_LEDS];

void setup() {
FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
}

thanks for your support!

Welcome Leo, with just the code that you have supplied, you have only set up the LEDs, but not told them to do anything. Can you try one of the examples like Blink.ino?

I know :slight_smile:

I just shared this to show my setup. the examples I have tried them already and then work, but I still have troubles understanding what to do…

Well if the examples work, and all you want to do is turn them all white then you only need:

for( int i = 0; i < NUM_LEDS; i++) {
leds[i] = CRGB::White;
}

after your addLeds line. This goes through every LED and turns it white.

weird: this is the whole code now, and it is not working. no error, it simply doesnt work

#include <FastLED.h>
#define NUM_LEDS 100
#define DATA_PIN 37

CRGB leds[NUM_LEDS];

void setup() {
FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
}

void loop() {
for(int i = 0; i < NUM_LEDS; i++) {
leds[i] = CRGB::White;
}
}

That should work. (though it’s overkill to set to white in the loop.)

I assume on your working blink.ino you ALSO have data pin = 37, and are using NEOPIXEL?

yes yes. I have just copied the loop you wrote me to the blink example, and it doesnt work…

and viceversa. there should be something wrong in that loop

Anytime you set the color of the LEDs in the leds[] array, you then need to call “FastLED.show()” to make FastLED send the leds[] array out to the physical set of LEDs.

You should try an example first that comes with the library. You will learn faster that way. Much faster than asking piece by piece here…good luck!

Oops, I missed that too. Had it in my own code, but didn’t copy that line to here. Sorry.

Excellent. that did it. I promise to study the library to not ask any more SO basic questions.

Now. the reason I wanted the whole strip white, is to see if I would REALLY have a whole strip white, and the answer is NO. I have a nice white at the biggining of the strip, and yelow at the other end (10 meters long)

I connected both the ground and the 12v from one end to the other, and this makes it a little bit better, but not completely. how can I sort this out?

thanksthanksthanks

So, your’re setting your entire strip white, which in turn means that you are pulling the most amps from your supply by doing so. If you have not LEDS.setBrightness(128); which is 50% master brightness, you may be experience a voltage sag where the LEDS aren’t lighting up correctly.

ow yeah. I put this command in the setup.

Now I have a more “uniform” white but there is some flickering…

so LEDS.setBrightness(256); is maximum brightness?

:slight_smile:

flickering may mean not enough power? How many amps is your power supply? Full on white draws the most. Most patterns don’t use anywhere near that much, My supply for 100 LEDs is 10 Amps (not that it uses it all)

my power supply is 6A

I am measuting the consumption all the time (since I am trying to learn the most), and right now the led strip is using just 0.9A

so, with maximum brightness (255) plus the ground connected in both ends, I still have a terrible white. mostly yellow and flickering. Any other idea on how to sort this out?

Share a picture of the strips, where the strips get power, where the strips get data, and stuff like that. Otherwise, it’s like trying to sort fly shit from pepper.

That’s a new expression to me :slight_smile:

yes, nice one.

I am thinking if you really want to see a picture of all the cables…