arvydas / blinkstick-python

BlinkStick Python interface to control devices connected to the computer
Other
136 stars 53 forks source link

turn_off() does not work for BlinkStick Strip #48

Open ham1 opened 7 years ago

ham1 commented 7 years ago

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".

Enverex commented 7 years ago

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

jonadem commented 5 years ago

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.