Skip to content

JavaFX UI + Arduino project to control the lights in a drum booth

Notifications You must be signed in to change notification settings

FDelporte/DrumBoothController

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Drum booth controller

JavaFX UI + Arduino project to control the lights and LED strips in a drum booth.

This project combines multiple examples of the book "Getting started with Java on Raspberry Pi". The sources of the examples in this book are freely available on GitHub. For more info see "Drumbooth controller with Raspberry Pi and JavaFX".

Wiring

  • USB cable between both boards (for serial communication)
  • 5V and ground from power supply to Pi, Arduino and LED strips
  • Control cable between pins 6, 7 and 8 to each of the three LED strips

Wiring scheme Installation

Commands between Java and Arduino application

The commands shared between both boards are strings in the structure “COMMAND_ID:SPEED:R1:G1:B1:R2:G2:B2”, where the command ID is one of the following options:

Java application

JavaFX user interface with three screens

Relays controller LED strip controller Exit and shutdown

Undertow webpage to trigger some actions

Web interface after selecting running light eb interface after selecting "red alert"

Build

Build and copy the files to your Raspberry Pi

$ mvn clean package
$ scp target/drumbooth-0.0.1 [email protected]://home/pi/drumbooth
$ scp scripts/start.sh [email protected]://home/pi/drumbooth

Running on Raspberry Pi

  • Install Pi4J v1 and WiringPi
$ curl -sSL https://pi4j.com/install | sudo bash
$ sudo pi4j --wiringpi
  • Copy this file to the Pi: "drumbooth-0.0.1-jar-with-dependencies.jar"
  • Install Java 11 on the Raspberry Pi if needed (with SDKMAN), we must use sudo sdk install to make the Java available for the sudo-user that also needs to be used to start the Pi4J application.
$ sudo apt install zip
$ curl -s "https://get.sdkman.io" | bash
$ sudo sdk install java 11.0.13-zulu
  • Download the JavaFX runtime
$ wget -O openjfx.zip https://gluonhq.com/download/javafx-17-ea-sdk-linux-arm32/
$ unzip openjfx.zip
$ sudo mv javafx-sdk-17/ /opt/javafx-sdk-17/
  • Run with the included script which can also be used at startup of the Pi to automatically launch the application
sudo bash /home/pi/drumbooth/start.sh

TFT screen

Settings to be added to config.txt

max_usb_current=1
hdmi_force_hotplug=1
config_hdmi_boost=10
hdmi_group=2
hdmi_mode=87
hdmi_cvt 1024 600 60 0 0 0

Arduino project

http://wiki.openmusiclabs.com/wiki/ArduinoFHT http://wiki.openmusiclabs.com/wiki/FHTExample

Application

Controls three WS2812 LED strips with the same effect. Code is separated into multiple file so it's easier to understand and maintain.

Inspired by

About

JavaFX UI + Arduino project to control the lights in a drum booth

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published