Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
vargn opened this issue Jan 3, 2024 · 10 comments
Open

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

vargn opened this issue Jan 3, 2024 · 10 comments

Comments

@vargn
Copy link

vargn commented Jan 3, 2024

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
Copy link
Author

vargn commented Jan 11, 2024

@arvydas Any ideas why this option does not work?

@nivit
Copy link

nivit commented Jan 13, 2024

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

@arvydas
Copy link
Owner

arvydas commented Jan 13, 2024

This option is available only for BlinkStick Flex.

@vargn
Copy link
Author

vargn commented Jan 16, 2024

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?

@nivit
Copy link

nivit commented Jan 16, 2024

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.

@vargn
Copy link
Author

vargn commented Jan 21, 2024

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.

@nivit
Copy link

nivit commented Jan 21, 2024

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.

@vargn
Copy link
Author

vargn commented Jan 22, 2024

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
Copy link
Author

vargn commented Feb 2, 2024

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

@p0ke234
Copy link

p0ke234 commented Feb 2, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants