Created
January 7, 2019 07:28
-
-
Save daz/b2d1404461d8977c26906e481102c5ae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uint8_t breathBrightness = (exp(sin(millis() / (float)breathRate * PI)) - 0.36787944) * 108.0; | |
uint8_t brightness = constrain(map(breathBrightness, 0, 250, 80, 255), 0, 255); | |
leds[0] = CHSV(hue, 255, brightness); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment