Me waving a single string in front of the camera ...

Me waving a single string in front of the camera …

I’d be curious to see what it looks like if you switch out hsv2rgb and replace it with rainbow2rgb. API and argument ranges are the same, but the output is a bit more balanced-- at the cost of a few cycles. (Or…wait… did you already do that here?)

The calculations I’m using is the HSV -> RGB math conversion from this page:

I’m toying with the HSL -> RGB conversions now so I can add the ‘L’ value in the code so that someone can press a button to make the display lighter or darker. Granted, I can change the (S)aturation value with the HSV model, but I want to see how different the HSL model is.

The FastSPI_LED2 library contains a function called hsv2rgb which has been optimized into AVR (Ardunio) assembly language and is very, very fast.
There’s also a second library function called rainbow2rgb which is also fast – and is also color-balanced to more closely match human color perception.
Documentation is sparse/absent at this point, but basically these functions take an HSV object (“CHSV”) and an RGB object (“CRGB”) and they translate the incoming hsv into outgoing rgb.
You might want to try the rainbow2rgb function; you’ll get a proportionately ‘fairer’ representation of reds and oranges and yellows, as well as a more uniform brightness across all the colors.

Uh, not in any of the downloadable zip files. I just checked. The latest one being …

I’m guessing @Daniel_Garcia hasn’t posted an updated zip file … yet. :slight_smile:

Oops- my bad. It’s in the svn repo but not in the download yet. Stay tuned.

Yeah, not in the read-only svn. :slight_smile: But yeah, I’d love to try it and see what kind of images it produces. The one thing that has always bugged me is the imbalance between red/orange/yellow versus green/cyan/blue. So if you guys have a better routine, that’s great.