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

--set-led-count does not work on Blinkstick Strip

Open vargn opened this issue 1 year ago • 10 comments

As the title says, I cannot get any LEDs to light up with --set-led-count option set in the command. I've tried in all three modes, and I've tried setting 0-8 LED counts. Adding the --verbose option gives no output at all.

By not passing the --set-led-count option, one of the eight LEDs lights up, and it's the one closest to the micro USB port.

Only one LED blinks with the following command:

python3 ~/.venv/bin/blinkstick --brightness 80 --repeats 3 --blink blue

No LEDs blink with the following command:

python3 ~/.venv/bin/blinkstick --set-led-count=8 --brightness 80 --repeats 3 --blink blue

I've tried --set-led-count=8, --set-led-count 8, --set-led-count="8" and --set-led-count "8". Still nothing.

Any ideas?

vargn avatar Jan 03 '24 23:01 vargn

@arvydas Any ideas why this option does not work?

vargn avatar Jan 11 '24 18:01 vargn

Hi, it's not clear what the option --set-led-count does effectvely, but if you want to "test" the single leds, you can run a little script such as

#!/usr/bin/env bash
leds_number=8

for i in $(jot $leds_number 0 $(( leds_number - 1))); do
  blinkstick --index=$i --blink --set-color=random
done

HTH

nivit avatar Jan 13 '24 22:01 nivit

This option is available only for BlinkStick Flex.

arvydas avatar Jan 13 '24 22:01 arvydas

This option is available only for BlinkStick Flex.

Then how do I activate more than one LED on the BlinkStick Strip? It has eight LEDs in total, but only one activates?

vargn avatar Jan 16 '24 15:01 vargn

You can do it for example with

blinkstick --index=0 --set-color="#22aaff"
blinkstick --index=2 --set-color="#ffaa22"

To turn off the leds set color to black.

nivit avatar Jan 16 '24 17:01 nivit

Thank you for your responses. I still can't get all LEDs to blink at the same time. I can only get them to blink one at a time.

python3 /home/user/.venv/bin/blinkstick --index=0 --set-color="#22aaff" --index=2 --set-color="#22aa22" --brightness 80 --repeats 5 --delay 100 --blink

The above command only activates LED nr 2.

vargn avatar Jan 21 '24 09:01 vargn

I don't think you can control more than one led with a single command. You have to issue more commands or maybe writing a Python program. You can control more leds with the command blinkstick putting them in background:

blinkstick --index=0 --set-color="#22aaff" --brightness 80 --repeats 5 --delay 1000 --blink &
blinkstick --index=2 --set-color="#22aa22" --brightness 80 --repeats 5 --delay 1000 --blink &

Note the ampersand at the end of the lines. However, it's hard that they will be synchronized. Maybe @arvydas can be more precise about that.

nivit avatar Jan 21 '24 18:01 nivit

With the ampersand the commands will be executed in a series, and not in paralell. So they will definitely not be in sync.

I'm a bit surprised it's not possible to activate more than one LED at a time. Technically it should not be complicated, but i'm no programmer. My skills go as far as being able to copypaste the code of others lol

While looking at the product page of the Blinkstick Strip. There is a screenshot where the Strip has all 8 LEDs activated.

image

There's also this quote: "BlinkStick Strip combines the features of BlinkStick Pro into one small package." Which made me believe it would have all the bells and whistles as the "Pro".

vargn avatar Jan 22 '24 13:01 vargn

I have yet to find a solution for how to have all LEDs blink simultaneously. Anyone got an idea?

vargn avatar Feb 02 '24 16:02 vargn

Hey @vargn,

try this:

data = [0,12,12,
        0,12,0,
        12,12,0,
        0,0,0,
        0,0,0,
        0,12,0,
        0,12,0,
        0,12,0,
        ]

led.set_led_data(0,data)

The example will set a a few leds to different colors. Hope this is what you are looking for.

p0ke234 avatar Feb 02 '24 17:02 p0ke234