Skip to content

Commit

Permalink
Fixed brightness control logic in RgbStripSerial example
Browse files Browse the repository at this point in the history
  • Loading branch information
bportaluri committed Jan 17, 2018
1 parent 6a3bef0 commit cda0b26
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions examples/RgbStripSerial/RgbStripSerial.ino
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ char cmdBuffer[CMDBUFSIZE];
// global settings and initial values
int animation = ALA_OFF;
AlaColor color = 0xdddddd;
AlaColor white = 0xffffff;
AlaPalette palette = alaPalNull;
int paletteId=0;
float brightness = 0.4;
long duration = 1000;
float brightness = 0.3;
long duration = 5000;


void setup()
Expand Down Expand Up @@ -68,7 +69,7 @@ void loop()
break;
case 'B':
brightness = atoi(&cmdBuffer[2]);
rgbStrip.setBrightness(color.scale((float)brightness / 100));
rgbStrip.setBrightness(white.scale((float)brightness / 100));
Serial.println("OK");
break;
case 'C':
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=ALA
version=2.3.3
version=2.3.4
author=bportaluri
maintainer=Bruno Portaluri <[email protected]>
sentence=Arduino Light Animation (ALA) library
Expand Down

0 comments on commit cda0b26

Please sign in to comment.