How to create a certain spectrum? I would like to get a snapshot like the KenkoLight ™ lamp. Tell me please.
Please provide more information about what you are wanting to do. Do you have a link to or image of what you are asking about?
I would like to receive such a spectrum:
The light spectrum from the typical addressable RGB LED light is going to be rather spikey and a tough place to start from. What you’re looking for might be possible, but having a really high CRI value is not what addressable RGB LEDs are known for.
#define NUM_LEDS 20
// № контакта подключаемого к ленте
// уровень яркости 0-255
// тип ленты (нужно для библиотеки)
// rgb, rbg, gbr,grb,brg,bgr зависит от ленты
#define DATA_PIN 5
#define HUE 156 // оттенок
//#define BRIGHTNESS 0 //яркость
#define SATURATION 30 //насыщенность
#define LED_TYPE WS2811
#define COLOR_ORDER BRG //работа, GRB-дом
// Определяем массив светодиодов
CRGBArray<NUM_LEDS > leds;
int gBright = 10; // базовая яркость
int brightStep = 1;//шаг изменения яркости
void setup()
{
FastLED.addLeds<LED_TYPE, DATA_PIN, COLOR_ORDER>(leds, NUM_LEDS).setCorrection(TypicalLEDStrip);
}
void loop() {
//static CEveryNSeconds newGBright(1);//вводим переменную цикла
static CEveryNMilliseconds newGBright(100);//вводим переменную цикла
for (; gBright < 255 ![]()
{
for (int i = 0; i < NUM_LEDS; i++) {
leds[i].setHSV( HUE, SATURATION, gBright);
}
if ( newGBright ) {
gBright++;
}
FastLED.show();
}
//по окончании цикла наращивания яркости, включаем белый свет
if (gBright==255)
{
for (int i = 0; i < NUM_LEDS; i++) {
leds[i] = CRGB::White;
}
FastLED.show();
}
}
Will it be something similar?
int brightStep = 1; The transition to brightness is too noticeable. How to get smoothly?
I do not speak English, so do not quite understand your answer. Understand that it is possible, but difficult to do. Sad. Thank you. And with the smooth, something will advise?
You might need to make the transition faster to get a smoother look.
Change:
static CEveryNMilliseconds newGBright(100);//вводим
To:
static CEveryNMilliseconds newGBright(10);//вводим
Or maybe this technique could help?
Since you seem interested in color spectrum, have a look at this too:
Thank you. I’ll study.