From ef35c17ea0a8571437945af5fe219d6c5d2c1834 Mon Sep 17 00:00:00 2001 From: squaredproject Date: Thu, 16 Aug 2018 20:27:25 -0700 Subject: [PATCH 1/4] updated compile/run to use gradle added systemctl service file for running crown software on startup on odroid --- Crown/compile.sh | 3 +-- Crown/crown.service | 10 ++++++++++ Crown/run.sh | 3 ++- 3 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 Crown/crown.service 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 index c608957..8ef367e 100644 --- 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/java/main:code/*" RunHeadless "${PWD}" From f7624ec0295068b0d7236e3c768e9ef73296d5c0 Mon Sep 17 00:00:00 2001 From: squaredproject Date: Thu, 16 Aug 2018 21:01:07 -0700 Subject: [PATCH 2/4] made run command work on odroid --- Crown/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 Crown/run.sh diff --git a/Crown/run.sh b/Crown/run.sh old mode 100644 new mode 100755 index 8ef367e..6c862c6 --- a/Crown/run.sh +++ b/Crown/run.sh @@ -2,4 +2,4 @@ cd "$( dirname "$0" )" echo java -Xms256m -Xmx1g -cp "build/classes/main:code/*" RunHeadless "${PWD}" -exec java -Xms256m -Xmx1g -cp "build/classes/java/main:code/*" RunHeadless "${PWD}" +exec java -Xms256m -Xmx1g -cp "build/classes/main:code/*" RunHeadless "${PWD}" From 73ac092dc6330cc4d1f461e6ae0e7a07f4ade6cf Mon Sep 17 00:00:00 2001 From: squaredproject Date: Thu, 16 Aug 2018 21:19:40 -0700 Subject: [PATCH 3/4] added more info to readme --- Crown/README.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/Crown/README.md b/Crown/README.md index fe39594..19e0b5c 100644 --- a/Crown/README.md +++ b/Crown/README.md @@ -2,6 +2,39 @@ 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 + + + ## SAVING SETS FOR LIVE PLAY ### READ THIS @@ -115,3 +148,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. + From ca00d2f09ee9485c2035e6c47c345eb9cd5907cf Mon Sep 17 00:00:00 2001 From: squaredproject Date: Thu, 16 Aug 2018 21:24:39 -0700 Subject: [PATCH 4/4] added info about changing NDB ip address --- Crown/README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Crown/README.md b/Crown/README.md index 19e0b5c..3576f0d 100644 --- a/Crown/README.md +++ b/Crown/README.md @@ -34,6 +34,13 @@ You can either run through the Processing or run the app headlessly. Use the P 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