Im trying to display a RGB color strip through the serial port Using HSV values. I am not sure the bast way to approach this however below is my attempt.
#include <FastLED.h>
#define LED_Pin 5
#define LEDnum 20
CRGB leds[LEDnum];
CHSV ledshsv[LEDnum];
void setup() {
FastLED.addLeds<WS2812B, LED_Pin>(leds, LEDnum);
FastLED.setBrightness(100); //to start will probably get set to 225 eventualy
}
void loop() {
fill_rainbow(leds, LEDnum, 0, 225/LEDnum);
for(int i = 0; i <= LEDnum; i++) {
//ledshsv[i] = rgb2hsv_approximate(CRGB(leds[i].r, leds[i].g, leds[i].b));
}
}
When trying to verify this it seems to completely verify but at the last second will say failed to verify however not give me any error codes. If anyone know why this is happening or a way to serial.print a RGB strip in HSV I would love to hear your takes.
Which board are you compiling for? Your code compiles for a Arduino Mega on my system. You have one bug however that results in a warning that can NOT be ignored.