Skip to content

Latest commit

 

History

History
51 lines (35 loc) · 1.82 KB

File metadata and controls

51 lines (35 loc) · 1.82 KB

BlinkStick Java API with Color Pattern Buffer Support

A Java library to control Digistump ATTiny85-based BlinkStick devices via USB to set a LED color or execute a color pattern directly on the Digistump.

Features

  • Uses org.hid4java.HidDevice instead of com.codeminders.hidapi
  • Includes effects like cross-fade and strobe
  • Has support for uploading a color pattern when using the color-patten firmware fork
  • Has try-with-resources support to close the USB properly

Examples

See the examples folder for several examples setting colors and patterns.

Images

Here is a device with the color-pattern-buffer firmware with which to use this Java API.

Digispark USB with custom soldered APA106 LED Digispark parts placement

Running in Docker

This is helpful:

# Install libudev and libusb-1.0
RUN apt-get update \
    && apt-get install -y --no-install-recommends \
    libudev-dev libusb-1.0-0 \
    && rm -rf /var/lib/apt/lists/*

# Link libudev.so.1 to libudev.so.0
RUN ln -sf $(find /lib -name libudev.so) $(find /lib -name libudev.so).0

Run docker run --device=/dev/bus ... to mount the USB devices.

Acknowledgements

The API is based on the the BlinkStick Android and BlinkStick for Processing libraries by arvydas.

Part of this fork is based off the fork from Flewp/blinkstick-java which adds a rate limiter when communicating with the WS2812. This version works well on Windows 10.