I’m trying to make a neopixel strip that is reactive to openweather API data.
I want to set a neopixel color to represent the current atmospheric temperature, in a range of temperatures from the daily high to the daily low. So, looped over a 24-hour period, the neopixel should range through the rainbow.
I think I need to use “colorwheel” and maybe the math min and max functions?
So, if the high is 80’, and the current temp is 80’, the neopixel would be the “hottest” color (Red, or 0 in colorwheel I think). If the current temp is 60’, which is also the daily low, the neopixel would be the “coolest” color (255, or violet). The “middle” would be 70’, and represented by color-wheel 127)
(I know that the physical temperature of color is different from the psycho-social color temp, but I live where red means hot, so please bear with me)
I’ve got most of the program down, other than the math and colorwheel. I think its probably a simple formula, but I’m coming up blank.
TY!