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

[new]: GetMode() and SetMode() #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pklaus
Copy link
Contributor

@pklaus pklaus commented Nov 12, 2020

@pklaus
Copy link
Contributor Author

pklaus commented Nov 12, 2020

I guess mode 0 and 1 only make sense on the BlinkStick Pro as it has the solder pads for analog (or PWM?) RGB output.
Should we safeguard the users to not use those modes on other devices? Does the older/original BlinkStick even respond to GetMode() / SetMode()? I don't know. It would be good to get some feedback from a person who actually has such a device.

@pklaus
Copy link
Contributor Author

pklaus commented Nov 12, 2020

I found yet another place where the modes are named:
https://github.com/arvydas/blinkstick-client/blob/a626386/BlinkStickClient.CLI/Options.cs#L49

0 - RGB LED, 1 - RGB LED inverse, 2 - WS2812, 3 - WS2812 mirror

(While I currently call it 0 = analog RGB, 1 = inverse, 2 = addressable multi LED, 3 = addressable mirrored multi LED in the comment explaining the function.)

What's most unambiguous and concise version for the library's users?

@different55
Copy link
Owner

Probably would be helpful to call out the 2 analog RGB options by the type of LED. One of the modes is common anode (mode 0) and the other is common cathode (mode 1).

I can't find any info on how the OG or Nano Blinksticks respond, only the other devices which are all technically Pros under the hood.

Only other thing, it isn't super clear that "mirrored addressable" means "Sorta addressable, but if you set the first LED the other 7 will follow." Maybe just that, "First 8 LEDs copy the first LED"?

@pklaus
Copy link
Contributor Author

pklaus commented Nov 16, 2020

Good points. Sounds good to indicate the hardware wiring for the analog modes. So what about the following:

// The possible modes are:
// 0 = analog RGB (common anode),
// 1 = analog RGB (common cathod),
// 2 = addressable WS2812 LEDs,
// 3 = addressable WS2812 LEDs in "mirror" mode: setting the first LED color also changes the other 7.
// After changing the mode, wait for ~10 ms with further queries.

I do own a BlinkStick Nano. It reacts to GetMode() and SetMode() just like the "Pro". It has two WS2812 LEDs. In mirror mode, the second LED is also updated when changing the first, as expected.

@different55
Copy link
Owner

Right, forgot the Nano had 2 LEDs. Maybe that makes it more Pro than OG? Maybe the firmwares aren't specialized at all, although I know the Flex in particular has its brightness limited to 25% so that it doesn't draw more than 500mA.

Ah, well. The phrasing you have there sounds clear enough with the extra info that I'm not sure we need to have a separate explicit warning anyway.

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

Successfully merging this pull request may close these issues.

2 participants