sirenofshame-java
Java Controller for the Siren of Shame - Uses usb4java
Prerequisites
Java 8 JDK Installed.
You can download Java 8 here
How to Linux
- Try to read info from device
./gradlew run -Pargs="-i"
if you get an Access Denied then - Open the file 99-sirenusb.rules
- Put in your user group instead of sirenofshame
- Copy the file to /etc/udev/rules.d/
- Unplug the Siren
- Run the command
udevadm trigger
- Plug in the Siren
- Run the examples
./gradlew run -Pargs="-i"
How to Mac OS
- Try to read device info
./gradlew run -Pargs="-i"
How to Windows
- Try to read device info
./gradlew run -Pargs="-i"
Commands
Read Device Info
- ./gradlew run -Pargs="-i"
Read Led Patterns
- ./gradlew run -Pargs="-rl"
Read Audio Patterns
- ./gradlew run -Pargs="-ra"
Manually set LED's
- Pass -m and 5 bytes (0-255), one for each LED bar
- For example the following sets the first bar to 50%, the 3rd bar to 100% and turns off everything else
- ./gradlew run -Pargs="-m 128 0 255 0 0"
Play led patterns
- Pass -l and the pattern id (see Read Led Patterns) and the duration in seconds
- For example the following plays Led pattern #2 (On/Off in Firmware 2.1) for 5 seconds
- ./gradlew run -Pargs="-l 2 5"
Play audio patterns
- Pass -a and the pattern id (see Read Audio Patterns) and the duration in seconds
- For example the following plays Audio pattern #1 (Sad Trombone in Firmware 2.1) for 5 seconds
- ./gradlew run -Pargs="-a 1 5"
Stop led pattern
- Pass -sl to stop long running led patterns
- ./gradlew run -Pargs="-sl"
Stop audio pattern
- Pass -sa to stop long running audio patterns
- ./gradlew run -Pargs="-sa"