Hello i have a question about the CHSV function in adafruits Ursula's seashell necklace.

Hello i have a question about the CHSV function in adafruits Ursula’s seashell necklace. On like 110 it states that the CHSV can be changed for rainbow. But i cant seem to figure out what to change it to. Any changes i make result in the whole strip being 1 color instead of a rainbow. Can anyone help me out?

Please provide a link to what you’re referring too.
Or post your code to http://pastebin.com

I tried pasting it last night but for some reason the post isnt showing. Here is the link to the original code. I have the data pin set to 0 and the Mic pin to A1 because im using an Attiny85. The only problem is that i want it to show a rainbow of color.

The line with CHSV(map(i,0,NUM_LEDS-1,50,70), 255, 255) has locked (hard coded) the saturation and brightness value to 255.
The hue is being controlled by the mapping function map(i,0,NUM_LEDS-1,50,70), and because it maps to the narrow number range of 50 to 70 the hue will always be a yellowish color. See this FastLED hue chart:

If you wanted to have it map to the full rainbow you could change the mapping part to:
map(i, 0, NUM_LEDS-1, 0, 255)

or to reverse the rainbow:
map(i, 0, NUM_LEDS-1, 255, 0)

Learn about the mapping function here if you’re not familiar:
https://www.arduino.cc/en/Reference/Map

Thanx! Thats really helpful! I was changing the 255 values thinking they were the green and blue values lol. Sorry im new to FastLED i was using Neopixel library before

You can use the CRGB or CHSV format depending on what you prefer or what makes more sense within your code.

CRGB(red, green, blue)
or
CHSV(hue, saturation, value) //“value” is the brightness

Using the HSV format is great once you understand it. Looking forward to seeing your VU Meter. :slight_smile:

Thanx! Having only 8K of memory has been hard since all the programs are so big but i need to find a good use for the 100 custom PCBs i had manufactured lol

This is my old pattern using the Neopixel library. I want to switch to the FastLED thou so ill probably post another video later :slight_smile:

Hey Im hoping you can help me i keep getting an error in lines 54 and 59. what am i doing wrong?

http://pastebin.com/3bHUk5Ff

never mind i found the error, forgot its supposed to be FastLED.show();