Im using esp32 cam and fastled library to grab pixelvalues from the integritet camera for trigging a ledmatrix connected with serpentine layout. The image is downsampled to 12x12 pixels corresponding to the amount of leds in the ledmatrix and looks like below. (in the image every pixel is 10 pixel big to better display the image)
When I am outputting something with clear red, green or blue everything looks as it should on the ledmatrix. Something like 200,40,35 also outputs a red dominant color.
But when I am outputting the values from the cam as on the image below the values are less dominant from red green or blue and are outputting something like 111, 147, 118. When I am connecting this to leds all the leds seems to be in the same color and outputts more or less white as in the image below.
I have checked the values and habe also tried to just grab one rgb value from the image and no matter what pixel I grab the image seem to be pretty much only white.
This is my code for just grabbing one pixel, and alternate it with red, green and blue color. RGB is correct but with a value copied from the rgbfile array it is only white.
void testColors()
{
for (uint8_t hue = 0; hue < 255; hue++)
{
fill_solid(leds, NUM_LEDS, CRGB(111, 147, 118));
FastLED.show();
delay(1000);
FastLED.clear();
delay(1000);
fill_solid(leds, NUM_LEDS, CRGB(255, 0, 0)); // Red color
FastLED.show();
Serial.println("RED");
delay(1000);
FastLED.clear();
delay(1000);
fill_solid(leds, NUM_LEDS, CRGB(0, 255, 0)); // Green color
FastLED.show();
Serial.println("GREEN");
delay(1000);
FastLED.clear();
delay(1000);
fill_solid(leds, NUM_LEDS, CRGB(0, 0, 255)); // Blue color
FastLED.show();
Serial.println("BLUE");
delay(1000);
FastLED.clear();
delay(1000);
}
}
This is my complete array. What do I miss to get the leds to output correct colors?
int rgbFile[] = {
254, 254, 254,
254, 254, 254,
253, 255, 253,
111, 147, 118,
103, 125, 100,
62, 123, 96,
75, 111, 90,
56, 102, 82,
62, 94, 63,
48, 86, 53,
43, 84, 48,
34, 74, 36,
254, 254, 254,
254, 254, 254,
246, 255, 231,
144, 167, 138,
124, 146, 121,
121, 146, 121,
116, 140, 119,
108, 131, 112,
98, 123, 99,
86, 110, 79,
73, 102, 66,
63, 86, 51,
172, 205, 157,
198, 230, 174,
163, 189, 152,
135, 162, 132,
124, 152, 126,
126, 147, 131,
119, 144, 127,
111, 136, 119,
90, 127, 104,
82, 113, 77,
68, 100, 69,
55, 80, 55,
138, 160, 121,
138, 168, 128,
141, 163, 130,
188, 224, 197,
161, 197, 170,
119, 152, 130,
116, 148, 130,
116, 142, 121,
100, 127, 103,
82, 109, 85,
72, 98, 68,
63, 82, 52,
119, 141, 110,
122, 143, 114,
157, 187, 161,
119, 155, 136,
153, 173, 170,
63, 86, 63,
120, 153, 131,
116, 143, 126,
104, 131, 107,
86, 103, 79,
71, 84, 61,
44, 66, 41,
108, 132, 101,
112, 135, 106,
115, 123, 109,
95, 100, 96,
163, 189, 188,
102, 128, 107,
119, 154, 131,
114, 139, 122,
68, 94, 64,
59, 78, 54,
44, 68, 43,
31, 58, 34,
105, 117, 92,
98, 126, 100,
95, 95, 70,
130, 151, 151,
136, 162, 161,
109, 126, 133,
111, 146, 119,
125, 152, 136,
126, 151, 134,
48, 54, 36,
41, 55, 36,
31, 39, 25,
80, 75, 56,
74, 92, 64,
143, 160, 132,
79, 103, 96,
160, 188, 182,
76, 93, 92,
118, 138, 141,
87, 109, 113,
68, 74, 80,
48, 58, 60,
45, 55, 59,
33, 47, 32,
78, 94, 72,
94, 126, 95,
78, 87, 60,
103, 117, 108,
58, 81, 107,
72, 81, 102,
65, 78, 103,
59, 69, 90,
64, 74, 79,
55, 61, 60,
44, 44, 45,
52, 69, 45,
93, 115, 84,
91, 128, 99,
158, 193, 168,
51, 54, 41,
73, 77, 99,
70, 77, 97,
66, 80, 97,
64, 65, 72,
56, 64, 75,
49, 54, 56,
38, 43, 44,
21, 41, 28,
96, 122, 95,
167, 209, 171,
113, 132, 92,
54, 82, 62,
60, 70, 91,
60, 69, 94,
64, 69, 89,
57, 66, 80,
51, 58, 66,
36, 43, 51,
33, 38, 34,
43, 56, 44,
43, 56, 34,
82, 111, 71,
64, 67, 35,
46, 48, 46,
68, 61, 85,
53, 59, 81,
42, 63, 79,
52, 53, 68,
46, 49, 58,
33, 41, 40,
35, 35, 38,
22, 29, 30};





