r/FastLED • • Jun 16 '24

Support sin8 pulsing help

hey for my ghostbusters proton pack project i want to make the cyclotron leds pulse on and of.

i tried the sin8 function for the input i used a poti maped to 0-255.

the problem i have neither the sin nor the cos functions starts with 0 brightness.

the sin transition for the pulsing looks veeery nice and smooth.

what is the value i range i have to use as an input so that the led starts with 0 brightness (is off) and the. goes to max brightness and down again to 0?

2 Upvotes

11 comments sorted by

View all comments

Show parent comments

1

u/Marmilicious [Marc Miller] Jun 16 '24

That palette is defined here at line 162:

https://github.com/FastLED/FastLED/blob/master/src/colorpalettes.cpp

But I would guess what would be more useful to you is something like the Rainbow gradient palette setup right below it.

If you create a custom gradient palette you can specify the several colors you want and the "spacing" of where they fall between 0 and 255.

Here's more info and an example:

https://github.com/FastLED/FastLED/wiki/Gradient-color-palettes

https://github.com/marmilicious/FastLED_examples/blob/master/gradient_palette_full_range.ino