Hi there. I'm very new to programming and using the Arduino so forgive me if this is a stupid mistake.
I set up an Arduino nano and some Neopixel sticks (3 x 8led sticks) in my PC case and pulled the pwm output from a motherboard header to control the color in relation to cpu temp. I used a low pass filter to convert pwm back into an analog signal. It works flawlessly if I just set it to change one parameter, for example just Hue. but I'm trying to get it to fade from white to purple to red. The code I have attached works but it flickers to white as it transitions from red to purple. It seems to be fairly sporadic so I'm kind of stumped here. Thanks for any help folks!
Just in case it wasn't clear in the original post, it works really well until I try to add in a the saturation variable. also if I just map the saturation (0, 1023, 0, 255) that works as well. it's when I try to use constrain to get the saturation to go to 255 and stop 1/4 of the way through the analogread that it gets funky.
I actually figured it out, it didn't like the extra " int cha1 = analogRead(A7); " line in the loop for some reason. it was leftover from something else I was trying and I forgot to remove it from the code thanks for trying to help me though!