Neo segment working (#443)

Finally have some to test with
This commit is contained in:
Michael Miller authored and GitHub committed 2021-03-03 16:42:12 -08:00
1 parent 1b56c2e7f7
commit e54a06736e
4 files changed
+166 -15

No files matched your search

@@ -30,7 +30,7 @@ void loop()
{
delay(2000);
strip.RotateLeft(1);
strip.RotateRight(1); // reads right to left, so it is reversed
strip.Show();
}
@@ -32,7 +32,7 @@ NeoPixelAnimator animations(Animation_COUNT);
void CycleAnimation(const AnimationParam& param)
{
// calculate which segment should be on using the animation progress
uint8_t bitfield = 1 << (uint8_t)(param.progress * LedSegment_F);
uint8_t bitfield = 1 << ( (uint8_t)(param.progress * LedSegment_G) % LedSegment_G);
// instant a digit with that segment on
SevenSegDigit digit(bitfield, brightness);
// apply it to the strip
@@ -126,7 +126,7 @@ void loop()
brightness);
// start the seconds fade animation
animations.StartAnimation(Animation_Fade, 1000, FadeAnimation);
animations.StartAnimation(Animation_Fade, 500, FadeAnimation);
// start the cycle animation for the next second
animations.StartAnimation(Animation_Cycle, 1000, CycleAnimation);