mirror of
https://github.com/brmlab/ledbar.git
synced 2025-06-09 21:34:00 +02:00
arduino: Change cmin[] semantics - pwm level of channel level 1, not 0
Should eliminate dim red light for black pixels.
This commit is contained in:
parent
ac8e6cd3a9
commit
b809208b60
3 changed files with 5 additions and 3 deletions
|
@ -28,7 +28,7 @@ void loop()
|
|||
while (!Serial.available());
|
||||
unsigned char s = Serial.read();
|
||||
//c[led][i] = s;
|
||||
c[led][i] = map(s, 0, 255, cmin[led][i], cmax[led][i]);
|
||||
c[led][i] = s == 0 ? 0 : map(s, 1, 255, cmin[led][i], cmax[led][i]);
|
||||
//Serial.print(c[led][i], DEC);
|
||||
//Serial.print(" ");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue