pimoroni / mote

Mote - drivers for the plug and play USB APA102 controller
https://shop.pimoroni.com/products/mote
MIT License
24 stars 14 forks source link

Added brightness parameter as fix to error in test.py and the module test function #28

Closed robgithub closed 5 years ago

robgithub commented 5 years ago

Found python/examples/test.py had fatal error when run Traceback (most recent call last): File "test.py", line 41, in <module> r, g, b = [int(c * 0.99) for c in mote.get_pixel(channel + 1, pixel)] ValueError: too many values to unpack This was duplicated in the python/library/mote/init.py module file

Found that get_pixel was returning RGB+Brightness, so fix was to accept a brightness parameter.

Also updated the documentation python/documentation/Function-reference.md to reference this.

Gadgetoid commented 5 years ago

Good spot! Thank you for raising a PR.