When writing to the matrix, treating it as a strip, this works great to create a nice rainbow spectrum:
Code: Select all
for( int i = 0; i < LED_COUNT; i++) {
uint32_t rgbcolor = strip.gamma32(strip.ColorHSV(i*256));
strip.setPixelColor(i, rgbcolor);
}strip.show();
Code: Select all
matrix.drawPixel(x,y, rgbcolor)
I took a closer look at the .drawPixel class in the library file, Adafruit_NeoMatrix.h. It looks like this class accepts a 16 bit color (uint16_t) instead of the 32 bit color (uint32_t). That's weird right? I have to assume that's why I am not getting the right colors.
Am wondering if that HSV and Gamma functionality is limited to use in strips only? Or am I missing something else? It would be a bit of a shame if that nice color wasn't available for a matrix of the same type of pixels.