Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fade instruction #2

Open
jimbobbennett opened this issue Mar 30, 2020 · 0 comments
Open

Add fade instruction #2

jimbobbennett opened this issue Mar 30, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@jimbobbennett
Copy link
Owner

Add an instruction to fade from one color frame to another.

This would be a top-level JSON value called fade. Default value is false. If true, then after each frame is set, it will fade to the next frame.

Fading will be done at 25ms intervals (this needs to be tested to ensure it can work on a Pi Zero with a lot of lights). The fading algorithm will be:

  • Determine the difference between the R, G and B values of current color and the next color.
  • Divide the frame time by 25ms to work out how many intermediate frames are needed.
  • Divide the difference between each color by the number of frames, and adjust the color by this difference

To hold colors between frames, set the same color for 2 frames in a row

@jimbobbennett jimbobbennett added the enhancement New feature or request label Mar 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant