Skip to content

Commit

Permalink
Fixing broken sample
Browse files Browse the repository at this point in the history
  • Loading branch information
jimbobbennett committed Jan 10, 2025
1 parent 11f4d23 commit cb36a02
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/devices/Blinkt/samples/Blinkt.Sample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ static void SetOnePixel(Blinkt blinkt, Color color, int i)
Color color = Color.FromArgb(new Random().Next(0, 255), new Random().Next(0, 255), new Random().Next(0, 255));

// Loop through the pixels, lighting them in the given color
for (int i = 0; i < Blinkt.NUMBER_OF_PIXELS; i++)
for (int i = 0; i < Blinkt.NumberOfPixels; i++)
{
SetOnePixel(blinkt, color, i);
}

// Loop through the pixels in reverse order, lighting them in the given color
// We skip the first pixel so there is a more pleasing bounce effect
for (int i = Blinkt.NUMBER_OF_PIXELS - 2; i >= 0; i--)
for (int i = Blinkt.NumberOfPixels - 2; i >= 0; i--)
{
SetOnePixel(blinkt, color, i);
}
Expand Down

0 comments on commit cb36a02

Please sign in to comment.