diff --git a/Crown/README.md b/Crown/README.md index fe39594..3576f0d 100644 --- a/Crown/README.md +++ b/Crown/README.md @@ -2,6 +2,46 @@ Sets for live play, the details of the color map, lessons learned +## Requirements +Java 8, 9, or 10 +Gradle +Processing 3.0 +git + +## How to Run +You can either run through the Processing or run the app headlessly. Use the Processing application when you want to use the UI and DJ patterns. headless mode is only for when the crown app is running continuously on an odroid without a screen (showtime) + +### HOWTO Run Interactively with Processing +1. Download Crown repo + - git clone https://github.com/squaredproject/crown.git +2. Open Processing 3.0 + - click File->Open + - navigate to Crown directory + - click on Crown.pde + - click on the arrow button to Run +3. Once Processing has loaded the app, it should show you the Crown software and you can start making patterns + +### HOWTO Run Headlessly +1. Download Crown repo from github + - git clone https://github.com/squaredproject/crown.git +2. Open terminal and navigate to repo directory + - eg. cd ~/crown/Crown +3. Compile java application using gradle + - gradle build +4. Excute shell script to run headlessly + - ./run.sh + - confirm script out says "LX Engine Started" at the end +5. Optional: configure machine to run crown on startup using crown.servoce + + +### How to change NDP IP addresses +The IP address for every NDB is saved in a config file called data/crown_clusters.json +If you change the NDBs conncted to the sculpture, you will need to: +1. Edit data/crown_clusters.json and add your specific NDP IP address in the right location +2. Recompile code using ./compile.sh OR restart Processing +2a. Optional - restart NDB by temporarily unplugging it from the power +3. Confirm new NDB LEDS are receiving data and LEDs are turning on as expected + ## SAVING SETS FOR LIVE PLAY ### READ THIS @@ -115,3 +155,4 @@ You can validate that the kernel portions are working by first doing an 'lsusb' the device is showing up in USb, then doing ALSA commands to see it in hte list of Alsa midi, then it should show up in the java iterators. + diff --git a/Crown/compile.sh b/Crown/compile.sh index a7fc2aa..961a00e 100755 --- a/Crown/compile.sh +++ b/Crown/compile.sh @@ -1,5 +1,4 @@ #!/bin/sh cd "$( dirname "$0" )" -mkdir -p build-tmp -javac -cp "code/*" -Xlint:unchecked -d build-tmp *.java +gradle build \ No newline at end of file diff --git a/Crown/crown.service b/Crown/crown.service new file mode 100644 index 0000000..5b5ea1a --- /dev/null +++ b/Crown/crown.service @@ -0,0 +1,10 @@ +[Unit] +Description=crown + +[Service] +ExecStart=/home/odroid/crown/Crown/run.sh +ExecStop=/bin/pkill java +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/Crown/run.sh b/Crown/run.sh old mode 100644 new mode 100755 index c608957..6c862c6 --- a/Crown/run.sh +++ b/Crown/run.sh @@ -1,4 +1,5 @@ #!/bin/sh cd "$( dirname "$0" )" -exec java -Xms256m -Xmx1g -cp "build-tmp:code/*" RunHeadless "${PWD}" +echo java -Xms256m -Xmx1g -cp "build/classes/main:code/*" RunHeadless "${PWD}" +exec java -Xms256m -Xmx1g -cp "build/classes/main:code/*" RunHeadless "${PWD}"