Skip to main content

blinkenhub

Python library and command-line tool to control the Blinkenhub Mac mini stand, a USB-connected ring of 17 RGB LEDs.

Installation

pip install blinkenhub

This installs the blinkenhub module and the blinkenhub command.

Command-line usage

The device is found automatically. To use a specific serial port, pass --port or set the BLINKENHUB_PORT environment variable.

blinkenhub rainbow --value 0.3 --rate 2   # spinning rainbow
blinkenhub disco                          # random colors until Ctrl-C
blinkenhub set-pixels -p 0 1 .5 -d 240 1 .2
blinkenhub animate-value --oscillate --rate 0.5 --count -1
blinkenhub stop                           # stop all animations

Run blinkenhub --help, or blinkenhub <command> --help, for every command and option.

blinkenhub run shows random colors while the Mac's displays are awake and a red sweep while they sleep. It works on macOS only; the other commands work on any platform.

Library usage

Colors are HSV: hue in degrees (0–360), saturation and value (brightness) from 0 to 1.

from blinkenhub import Blinkenhub, HSV_Color, SetPixels, Rotate, ValueAnimation, Animation

bh = Blinkenhub()            # or Blinkenhub("/dev/cu.usbmodem1101")

# Set all 17 pixels to dim blue, fading over one second
bh.send(SetPixels([HSV_Color(240, 1, 0.2)] * 17, 1.0))

# Pulse the brightness forever
bh.send(ValueAnimation(Animation.ANIMATE_UPDOWN, rate=0.5, top=0.5, bottom=0.05, count=-1))

# Spin the pattern clockwise at 3 pixels per second
bh.send(Rotate(Rotate.CW, 3.0, -1))

send() returns True when the device accepts the command, and raises TimeoutException if it doesn't answer.

License

MIT. See LICENSE.

Metadata

Release files for blinkenhub 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for blinkenhub 0.1.0
File Size Uploaded Provenance Actions
blinkenhub-0.1.0.tar.gz 8.9 kB Without provenance Details for blinkenhub-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for blinkenhub 0.1.0
File Interpreter ABI Platform Actions
blinkenhub-0.1.0-py3-none-any.whl Python 3 none any Details for blinkenhub-0.1.0-py3-none-any.whl

Total release size: 18.2 kB

Release files / blinkenhub-0.1.0.tar.gz

Download URL blinkenhub-0.1.0.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c0f2ffe50f80351c2f1650dcf735e6d8808fbfa43145d95a2d38d1b92fc9936c
BLAKE2b-256 checksum
How to use checksums
1dbb50fcd126693f6d98a5c805b48426e1e3816732ac7aef48ec03aeaa5db80b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.2

Release files / blinkenhub-0.1.0-py3-none-any.whl

Download URL blinkenhub-0.1.0-py3-none-any.whl
Size 9.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
08f226987d4940be2cfab8ec38cd0dd893a0609364204cb556e24f287d8db70e
BLAKE2b-256 checksum
How to use checksums
7b67dd3c02f6609dbcae0d0b2828cb20c18b7e02b3de43b6dbaf71818a284f48
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.2

Security for blinkenhub 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page