blinkstick-python icon indicating copy to clipboard operation
blinkstick-python copied to clipboard

turn_off() does not work for BlinkStick Strip

Open ham1 opened this issue 7 years ago • 2 comments

The below code sets all the LEDs on the Blinkstick Strip to blue but does not turn them off.

from blinkstick import blinkstick

bstick = blinkstick.find_first()
for i in range(8):
	bstick.set_color(index=i, name="blue")

bstick.turn_off()

My current workaround is to set them all to "black".

ham1 avatar May 20 '17 18:05 ham1

Have you tried just "off" instead? e.g. self.off() (or bstick.off() in your case). That's what I use.

Enverex avatar Aug 31 '17 11:08 Enverex

For the record: bstick.turn_off() (only) works for the first LED

One way to do it instantly is with bstick.set_led_data(0, [0]*3*led_nbr)

The offmethod is defined in the class BlinkStickPro but blinkstick.find_first() returns an instance of the BlinkStick class.

jonadem avatar Feb 06 '19 15:02 jonadem