Hello,
I'm wondering about the setBrightness command in the arduino Neopixel Library. I know that the Neopixel need 24 Bits of data 8 Bits per Color. So there are no Bits for Brightness. Isnt it so that the Brightness of the different colors is set by the value of the byte (means 0 = off 255 = very bright)?
so I wonder what purpose this command has. Maybe someone could explain it? :)
Thanks! :)
Neopixel setBrightness command
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: Neopixel setBrightness command
it sets a global multiplier (actually, it's the numerator of a fractional multiplier).
For instance, if you call setBrightness(64), followed by setPixel(i, 255, 192, 128), setPixel will multiply each of r, g, and b by (64/255), so you wind up actually setting the pixel to (64, 48, 32)
For instance, if you call setBrightness(64), followed by setPixel(i, 255, 192, 128), setPixel will multiply each of r, g, and b by (64/255), so you wind up actually setting the pixel to (64, 48, 32)
- hammersmith
- Posts: 16
- Joined: Tue Jan 21, 2014 2:32 pm
Re: Neopixel setBrightness command
Oh thats kind of usefull thanks :D
Please be positive and constructive with your questions and comments.