From da1e9fe2e8a45ec1d05d19804e527b0207c5df11 Mon Sep 17 00:00:00 2001 From: Fabrizio Di Vittorio Date: Sat, 1 Apr 2017 17:12:55 +0200 Subject: [PATCH] Update digispark.ino rgb[] array is not correctly indexed inside setPixel() function --- .../libraries/WS2811/examples/digispark/digispark.ino | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/digistump-avr/libraries/WS2811/examples/digispark/digispark.ino b/digistump-avr/libraries/WS2811/examples/digispark/digispark.ino index ff922a4..a4237a4 100644 --- a/digistump-avr/libraries/WS2811/examples/digispark/digispark.ino +++ b/digistump-avr/libraries/WS2811/examples/digispark/digispark.ino @@ -14,11 +14,11 @@ void loop() { } void setPixel(i,r,g,b){ - rgb[r].r=r; - rgb[g].g=g; - rgb[b].b=b; + rgb[i].r=r; + rgb[i].g=g; + rgb[i].b=b; } void updatePixels(){ WS2811RGB(rgb, ARRAYLEN(rgb)); -} \ No newline at end of file +}