and looking for advices on a way to convert them to RGB values via a formula instead of brute force manually typing all possible combination. what im reading is from left to right is 0x00 - 0xFF respectively. They are arranged by their spectrum frequency 700nm - 400nm (ROYGBIV)
is there a way to extract the 8bit rgb values from the wavelength frequency?
Maybe not exactly what you want, but in the HSV (Hue, Saturation, Brightness) system the hue goes from 0 (red) to 360* (violet). So you could relate frequency to hue.
In the FastLED library the hue values go from 0 to 255 so it will fit in one byte.
Sadly no frequeny. I was thinking of setting the red most part as 700nm and the violet most part as 400nm split everything inbetween them by 256 values and extract it from there.
BUT i found a frequency chart red is 4.29x10^14 and violet is 7.5x10^14. so i cann map everything inbetweenn to those numbers.
basically what i want to do is to for a RGB led that takes in an RGB values to follow what ever was selected on the color slider. The data i read from color slider is from 0 - 255 (red-violet). since im memory costrained i cannot simply list all the rgb values for all the position of the slider hence i am asking advice on how to do it in a formulaic way
This one looks good and siimple enough that i can port over to c++. but it a bit dominnant on the red side, ill have to play a bit with the numbers, how was he able to show the whole spectrum?
looks good, but why is the green only valued at 128 ? since green has its own LED isnt it supposed to be 255? i did try to change it to 255 and it looked good