BlinkStick Flex Ambilight

just noticed my blink pro and my flex have the same serial number but the flex says 3.1 and pro 2.1 but the first lot of the serial is the same,i did buy them both the same time,they came as the two in one package,is that ok they have the same serial number? its making me think more that its got wrong firmware,like a mix up or somthing,my cliant crashes alot with my flex too.

can you send me a command to light up 31 leds in python for the blinkstick flex,i think ime using python correct,i go to command line type python it starts python in the command prompt then i type import blinkstick then do i past the command and hit enter,i think thats what i did last time?

from blinkstick import blinkstick

bstick = blinkstick.find_first()

x=0
while x < 31:
bstick.set_color(channel=0, index=x, name="red")
x+=1

That should light all the LEDs on the Flex, although you will need to indent the last two lines which are inside the while loop - I can’t work out how to add a tab on here.

Arvydas also has some example Python code stored here which may be helpful for testing.

This would be the best option to try, just to change the r_led_count value:

@ryan_oshea thanks for the example! You actually need to add delay just after the color is set, because BlinkStick can’t accept color changes that fast :smiley:

still only showing 8 led on flex it wjust wont exept more than 8

this example has lots of indentation errors

ime just learning python,i managed to understand ryan_oshea when he said to indent the example he shown,that one worked but i dont have a clue what to fix on the last example,i realy dont think my flex is going to work properly,i think its got wrong firmware on or its corrupt partly or somthing,ive installed my client over and over so its not client.

My Flex also only lights up 8 LEDs this isn’t a fault with your specific Flex but a failsafe to avoid overloading your USB port as Arvydas explained at the top of this thread.
I have managed to light 22 LEDs but I don’t have access to my Flex right now so can’t check how I did that, try using the command line tool, see the link at the bottom of this post, to change the mode to inverse and see if it lights more than 8 LEDs.
As for being able to light all 32, I have no idea and you’ll have to find that out from Arvydas or maybe poke.

Blinkstick command line tool <–Command line tool download
https://www.blinkstick.com/help/tutorials/blinkstick-pro-modes <–Setting modes with command line tool

Ah, I think we have a little discrepancy here. I tested flex directly on the first page with clicking and lighting up one LED after another. For me I can light up any of the 32 LEDs.
Maybe for the test notification it does not work. I can take a look at it in the evening…

Yes i tryed that too,the first strip of leds light up but not the other 3 below they do on the pic but not my strip,and i know my strip isnt faulty as ive tryed many others,we will sort it,ime just trying to understand this python command line tool exe,do i drag it into cmd thats what ime doing and it finds my flex but ime having syntax errors with any code like blinkstick --set-mode 2 ive tryed typing this in command line,ive a feeling ime missing somthing,thanks guys for helping me and being patiant with me,ime trying my best its hard though,

In the setting for flex it does say 32 leds on r channel, ive tryed changing mode in python it seems to work but still no more leds than 8 even tryed to lower brightness to 10%.
Also whats the data box for store upto 32 symbols?
Is there info witch ive missed as it seems like ime missing info that others seem to know that i dont,i think ive read the whole site,i cant find info on what the data box does,or is this all still work in progress.

I can light up the 32 leds in the first page but my strip stops at 8.

How big of a delay does the blinkstick need?

20ms should be enough

Wow okay that’s a large-ish delay. Is that a delay between any two commands to any LED? Is it possible to send a batch of commands all at once?

As far as I know it is a delay between 2 commands. But in the BlinkStickDotNet API is a SetColors command. I haven´t tried it yet, but that could be the one that you looking for… sending colors as a batch… I should also give that a try :wink:

Yup, as I thought. In c# it works like this:

byte[] data = new byte[9] {255,0,0,0,255,0,0,0,255};
blink.SetColors(0,data);

It sets the first 3 LEDs of a flex.

Edit:
Works like this in python:

cols = [255,0,0,0,255,0,0,0,255,255,255,255,255,255,0,0,255,255,255,0,255]
led.set_led_data(0,cols)
1 Like

Just got my flex in the mail today and set_led_data works perfectly. Thanks a ton! :smile:

Having a little issue with set_led_data in python. Green seems like it’s switched with red.

If I run this:

from blinkstick import blinkstick

stk = blinkstick.find_first()
data = [255,0,0, 255,0,0, 0,255,0, 0,255,0, 0,0,255, 0,0,255]
stk.set_led_data(0, data)

I get this:

Instead of this like I would have expected:

I saw it with my music visualization (the pixels towards the middle glow red when they should be green like the image) but I thought it was just a screwup in my code. I couldn’t figure it out and started whittling down code until I got to just this and it’s still here so I figure it’s either a bug or a misunderstanding on my part.

Hey Diff,

The LED data frame is in GRB format.

1 Like