Skip to content

SkylarWatson/blinky

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blinky Logo

Build Status

Blinky is a Java wrapper around Blink(1). It was initially written to manage Blink(1) USB operations programmatically.

Maven Dependency

<dependency>
  <groupId>com.skylarwatson</groupId>
  <artifactId>blinky</artifactId>
  <version>1.2.1</version>
</dependency>

Usage

First initialize your blinky project

public class Main {
    public static void main(String[] args) {
        new BlinkApplicationRunner().run();
    }
}

Next, you'll want to create a blink rule

@Blinker
public class BlinkDemo implements BlinkRule {
    @Override
    public boolean illuminate() {
        return true;
    }
}

If illuminate() returns true blink(1) USB will turn red

To change the led color supply an RGB value to the @Blinker annotation.

@Blinker(color = RGB.GREEN)

You can select which led to enable by providing a LED value to the @Blinker annotation

@Blinker(led = LED.TOP)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages