Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yesnault/blinkstick
Blinkstick SDK & CLI
https://github.com/yesnault/blinkstick
blinkstick blinkstick-sdk cli sdk
Last synced: about 1 month ago
JSON representation
Blinkstick SDK & CLI
- Host: GitHub
- URL: https://github.com/yesnault/blinkstick
- Owner: yesnault
- License: bsd-3-clause
- Created: 2017-02-04T18:18:40.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-06T21:00:09.000Z (almost 8 years ago)
- Last Synced: 2024-06-20T13:34:22.792Z (5 months ago)
- Topics: blinkstick, blinkstick-sdk, cli, sdk
- Language: Go
- Size: 1.17 MB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/yesnault/blinkstick.svg?branch=master)](https://travis-ci.org/yesnault/blinkstick)
[![GoDoc](https://godoc.org/github.com/yesnault/blinkstick?status.svg)](https://godoc.org/github.com/yesnault/blinkstick)
[![Go Report Card](https://goreportcard.com/badge/yesnault/blinkstick)](https://goreportcard.com/report/yesnault/blinkstick)# Blinkstick SDK & CLI
SDK and CLI for [BlinkStick](https://www.blinkstick.com/)
**/!\ Work in progress.**
## Download
See https://github.com/yesnault/blinkstick/releases## Supported device
* Blinckstick Nano
* Blinckstick Flex
* Blinckstick Strip & Square## Usage
### Main Menu
``` bash
$blink
Blink - Command Line for BlinkstickUsage:
blink [command]Available Commands:
color Color list
device device
flex flex
nano nano
strip strip
update Update blink to the latest release version: blink update
version Display Version of blink: blink versionFlags:
--log-level string Log Level : debug, info or warnUse "blink [command] --help" for more information about a command.
```### Nano
Example:
```bash
$ blink nano --help
nanoUsage:
blink nano [flags]
blink nano [command]Available Commands:
color Color a blinkstick nano: blink nano color [] [--brightness=n] [--top=] [--bottom=] [--serial=s] [--duration=n] [--repeats=n] [--blink]
list List all blinkstick nano
``````bash
$blink nano color --help
Color a blinkstick nano:Set the same color for both led with 50% brightness :
blink nano color orange --brightness 50Set a color for bottom Led and another for top Led:
blink nano color --bottom red --top greenExamples:
blink nano color --top purple --brightness 1
blink nano color --bottom red --brightness 100
blink nano color green --brightness 12
blink nano color --serial BS008173-3.0 --duration=500 --repeats=10 --brightness 30 --blink --bottom redTurn off light:
blink nano color blackUsage:
blink nano color [flags]Flags:
--blink Blink LED
--bottom string Color for botton led
--brightness int Limit the brightness of the color 0..100 (default 1)
--duration int Set duration of transition in milliseconds (use with --blink) (default 100)
--repeats int Number of repetitions (use with --blink) (default 10)
--serial string Select device by serial number. If unspecified, action will be performed on all BlinkSticks Strip
--top string Color for top led: blink nano color red
```### Flex
Example:
```bash
$ blink flex --help
flexUsage:
blink flex [flags]
blink flex [command]Available Commands:
color Color a blinkstick flex: blink flex color [] [--brightness=n] [--led=n] [--serial=s] [--duration=n] [--repeats=n] [--blink]
list List all blinkstick flex```
```bash
$ blink flex color --help
Color a blinkstick flex:Set the same color for all leds with 50% brightness :
blink flex color orange --brightness 50Color led 0 and 7
blink flex color red --led 0 --led 7Examples:
blink flex color powderblue
blink flex color powderblue --brightness 60 --blink --repeats 1
blink flex color ghostwhite --led 0 --led 2 --led 3 --led 5 --led 7 --led 11 --led 13 --led 17 --led 19 --led 23 --led 29 --led 31Turn off light:
blink flex color blackUsage:
blink flex color [flags]Flags:
--blink Blink LED
--brightness int Limit the brightness of the color 0..100 (default 10)
--duration int Set duration of transition in milliseconds (use with --blink) (default 100)
--led intSlice Led to manipulate: 0..7. If unspecified, action will be performed on all leds
--repeats int Number of repetitions (use with --blink) (default 10)
--serial string Select device by serial number. If unspecified, action will be performed on all BlinkSticks Flex
```### Strip & Square
Idem as flex, but max led is 7.
```bash
$ blink strip --help
stripUsage:
blink strip [flags]
blink strip [command]Available Commands:
color Color a blinkstick strip: blink strip color [] [--brightness=n] [--serial=s] [--duration=n] [--repeats=n] [--blink]
list List all blinkstick strip
``````bash
$ blink strip color --help
Color a blinkstick strip:Set the same color for all leds with 50% brightness :
blink flex color orange --brightness 50Color led 0 and 7
blink flex color red --led 0 --led 7Examples:
blink flex color powderblue
blink flex color powderblue --brightness 60 --blink --repeats 1
blink flex color ghostwhite --led 0 --led 2 --led 3 --led 5 --led 7Turn off light:
blink flex color blackUsage:
blink strip color [flags]Flags:
--blink Blink LED
--brightness int Limit the brightness of the color 0..100 (default 10)
--color string Color for top and bottom led: blink strip color red
--duration int Set duration of transition in milliseconds (use with --blink) (default 100)
--led intSlice Led to manipulate: 0..7. If unspecified, action will be performed on all leds
--repeats int Number of repetitions (use with --blink) (default 10)
--serial string Select device by serial number. If unspecified, action will be performed on all BlinkSticks Strip```
### Color
```
for i in `./blink color list`; do echo $i && ./blink flex color $i; done;
```# Hacking
* `$GOPATH/src/github.com/yesnault/blinkstick` contains SDK
* `$GOPATH/src/github.com/yesnault/blinkstick/cli/blink` contains CLI```bash
mkdir -p $GOPATH/src/github.com/yesnault
cd $GOPATH/src/github.com/yesnault
git clone [email protected]:yesnault/blinkstick.git
cd blinkstick
go install ./...
blink version
```You've developed a new cool feature? Fixed an annoying bug? We'd be happy
to hear from you! Make sure to read [CONTRIBUTING.md](./CONTRIBUTING.md) before.# License
This work is under the BSD license, see the [LICENSE](LICENSE) file for details.