Permalink
Browse files

Changed the loop iteration variable in all examples to uint16_t to ma…

…ke it easier for people with more than 254 LEDs.
  • Loading branch information...
1 parent e299220 commit 31eeaac6be87d84c3020c8c696abfb22eb9e65d6 @DavidEGrayson DavidEGrayson committed Jan 7, 2014
@@ -59,7 +59,7 @@ void loop()
color.blue = Serial.parseInt();
// Update the colors buffer.
- for(byte i = 0; i < LED_COUNT; i++)
+ for(uint16_t i = 0; i < LED_COUNT; i++)
{
colors[i] = color;
}
@@ -24,7 +24,7 @@ void loop()
{
// Update the colors.
byte time = millis() >> 2;
- for(byte i = 0; i < LED_COUNT; i++)
+ for(uint16_t i = 0; i < LED_COUNT; i++)
{
byte x = time - 8*i;
colors[i] = (rgb_color){ x, 255 - x, x };
@@ -46,7 +46,7 @@ void loop()
{
// Update the colors.
uint16_t time = millis() >> 2;
- for(byte i = 0; i < LED_COUNT; i++)
+ for(uint16_t i = 0; i < LED_COUNT; i++)
{
byte x = (time >> 2) - (i << 3);
colors[i] = hsvToRgb((uint32_t)x * 359 / 256, 255, 255);

0 comments on commit 31eeaac

Please sign in to comment.