E
E
Eugene2021-12-12 20:49:34
Arduino
Eugene, 2021-12-12 20:49:34

Why does NeoPixel display colors incorrectly?

I'm trying to light an addressable LED strip with WS2812B diodes. Like how I assembled it, wrote a sketch, everything glows without problems. The problem started at the stage when I decided to change the colors. It turned out that most of them are simply not displayed. Those. those LEDs that should light up in the desired color may light up differently or simply do not light up, as if they were set to black. For example:

uint32_t FonColor = Display.Color(20, 20, 200); // работает
uint32_t IntColor = Display.Color(200, 200, 22); // работает
uint32_t ErrColor = Display.Color(255, 0, 0); // работает
uint32_t Col1Color = Display.Color(255, 255, 255); // работает
uint32_t Col2Color = Display.Color(0, 0, 0); // работает

uint32_t FonColor = Display.Color(0, 64, 0); // не загораются, чёрный цвет
uint32_t FonColor = Display.Color(10,100, 100); // не загораются, чёрный цвет


Also, some colors may not display correctly. For example, these two options are displayed in one red color:
Display.Color(150, 50, 30);
Display.Color(255, 0, 0);


Initially, I thought that the wrong flag was set when creating the object, now it is set like this:
Adafruit_NeoPixel Display = Adafruit_NeoPixel(Config.AllLed, Config.Pin, NEO_GRB + NEO_KHZ800);


But I just tried all the flags in a row by typing. Other options either do not work at all, the tape does not light up at all, or everything lights up in random order.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Eugene, 2021-12-27
@jenya92

As it turned out, the reason is that I had the tape in front of my nose and so as not to blind - I set the brightness to one in the settings. Sbostvenno on this dark colors and did not burn. Because they themselves are dark, but also the brightness is at a minimum. It was worth setting the brightness to half - and everything worked as it should.

A
Anton Shamanov, 2021-12-13
@SilenceOfWinter

uint32_t FonColor = Display.Color(0, 64, 0); // do not light up, black color
What do you think dark green light looks like?))
Display.Color(10,100, 100); // do not light up, black color
also dark
Also, some colors may not display correctly. For example, these two options are displayed in one red color.
everything is ok, both values ​​are red light, 150, 50, 30 - brick, 255, 0, 0 - bright red.
open paint and type the values ​​into the RGB fields of the color palette

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question