ajfisher / node-pixel

Library for using addressable LEDs (such as NeoPixels/WS2812) with Firmata and JohnnyFive
MIT License
275 stars 71 forks source link

Add brightness #199

Closed hweeks closed 3 years ago

hweeks commented 3 years ago

oops

ScreamZ commented 1 year ago

@hweeks Why is this not merged ? @ajfisher ?

Any way to adjust brightness ?

ajfisher commented 1 year ago

@ScreamZ it's because it fundamentally changes a lot of assumptions around the repo and makes a lot of shifts to type script which wasn't really intended. As such this went into a little dead end.

Noirmally the way I adjust brightness on a standard RGB strip is simply apply a multiplier backwards on the values - eg divide by half etc. It's not perfect but that works. Alternatively, I drop the voltage on the strip a little as most RGB strips will happily run at 3.3v instead of 5 and so long as you supply >2.5v the logic circuit will work okay.

If you want to cherry pick the brightness parts out and make a PR then that would be much appreciated.